ID && $current_user->has_cap('manage_options') || ($current_user->ID && $current_user->has_cap('wppm_admin')))) {exit;} if ( check_ajax_referer( 'wppm_delete_status', '_ajax_nonce', false ) != 1 ) { wp_send_json_error( 'Unauthorised request!', 401 ); } $status_id = isset($_POST) && isset($_POST['status_id']) ? absint(sanitize_text_field(wp_unslash($_POST['status_id']))) : 0; if (!$status_id) {exit;} $wpdb->delete($wpdb->prefix.'wppm_project_statuses', array( 'id' => absint($status_id)));