# taskbuilder/6.0.3/includes/admin/settings/wppm_delete_task_priority.php

Taskbuilder – Project Management &amp; Task Management Tool With Kanban Board, version 6.0.3. 16 lines.

- Page: https://pluginprobe.com/plugins/taskbuilder/6.0.3/code/includes/admin/settings/wppm_delete_task_priority.php
- Raw: https://pluginprobe.com/plugins/taskbuilder/6.0.3/raw/includes/admin/settings/wppm_delete_task_priority.php
- Modified: 2026-08-22T18:03:44+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/taskbuilder/6.0.3/code/includes/admin/settings/wppm_delete_task_priority.php#L10-L20`.

```php
<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

global $current_user,$wpdb;
if (!($current_user->ID && $current_user->has_cap('manage_options') || ($current_user->ID && $current_user->has_cap('wppm_admin')))) {exit;}
if ( check_ajax_referer( 'wppm_delete_task_priority', '_ajax_nonce', false ) != 1 ) {
    wp_send_json_error( 'Unauthorised request!', 401 );
}

$priority_id = isset($_POST) && isset($_POST['priority_id']) ? absint(sanitize_text_field(wp_unslash($_POST['priority_id']))) : 0;
if (!$priority_id) {exit;}

$wpdb->delete($wpdb->prefix.'wppm_task_priorities', array( 'id' => absint($priority_id)));

```
