| 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 |
|
| 9 |
$priority_id = isset($_POST) && isset($_POST['priority_id']) ? intval(sanitize_text_field($_POST['priority_id'])) : 0; |
| 10 |
if (!$priority_id) {exit;} |
| 11 |
|
| 12 |
$wpdb->delete($wpdb->prefix.'wppm_task_priorities', array( 'id' => $priority_id)); |
| 13 |
|