Location: PHPKode > projects > ProjectPress > projectpress/delete.php
<?php
/**
 * ProjectPress delete wall feed and its comment(s)
 *
 * @package ProjectPress
 * @since 2.0
 */

// Starts the session.
session_start();
define('access',true);
require_once(dirname(__FILE__) . '/config.inc.php');
require_once(PM_DIR . 'pm-includes/global.inc.php');

// Checks if user is logged in; if not redirect to login page.
if($current_user->hasPermission('access_site') != true) { pm_redirect(PM_URI . '/index.php'); }

// Enable for error checking and troubleshooting.
# display_errors();
	
pmdb::connect()->query("delete from ". DB ."wall_posts where p_id ='".$_REQUEST['id']."' AND p_user ='".$_SESSION['username']."'");
pmdb::connect()->query("delete from ". DB ."wall_posts_comments where post_id ='".$_REQUEST['id']."'");
pmdb::connect()->query("delete from ". DB ."wall_likes_username where post_id ='".$_REQUEST['id']."'");
Return current item: ProjectPress