PluginProbe
Taskbuilder – Project Management & Task Management Tool With Kanban Board / 3.0.0
Taskbuilder – Project Management & Task Management Tool With Kanban Board v3.0.0
6.0.5 6.0.2 6.0.3 6.0.4 6.0.1 6.0.0 5.0.8 5.0.9 4.0.9 5.0.0 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 All 57 releases
taskbuilder / includes / admin / settings / wppm_delete_task_priority.php

wppm_delete_task_priority.php in Taskbuilder – Project Management & Task Management Tool With Kanban Board 3.0.0, at includes/admin/settings/wppm_delete_task_priority.php

16 lines 558 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit; // Exit if accessed directly
4 }
5
6 global $current_user,$wpdb;
7 if (!($current_user->ID && $current_user->has_cap('manage_options'))) {exit;}
8 if ( check_ajax_referer( 'wppm_delete_task_priority', '_ajax_nonce', false ) != 1 ) {
9 wp_send_json_error( 'Unauthorised request!', 401 );
10 }
11
12 $priority_id = isset($_POST) && isset($_POST['priority_id']) ? intval(sanitize_text_field($_POST['priority_id'])) : 0;
13 if (!$priority_id) {exit;}
14
15 $wpdb->delete($wpdb->prefix.'wppm_task_priorities', array( 'id' => $priority_id));
16