PluginProbe
Taskbuilder – Project Management & Task Management Tool With Kanban Board / 6.0.6
Taskbuilder – Project Management & Task Management Tool With Kanban Board v6.0.6
6.0.6 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 All 58 releases
← All changes | includes/admin/settings/wppm_delete_category.php +17 -17 5.0.06.0.6 View file →
@@ -1,17 +1,17 @@
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')|| ($current_user->ID && $current_user->has_cap('wppm_admin')))) {exit;}
8 -if ( check_ajax_referer( 'wppm_delete_category', '_ajax_nonce', false ) != 1 ) {
9 - wp_send_json_error( 'Unauthorised request!', 401 );
10 -}
11 -$cat_id = isset($_POST) && isset($_POST['cat_id']) ? intval(sanitize_text_field($_POST['cat_id'])) : 0;
12 -$cat_id = esc_sql($cat_id);
13 -if (!$cat_id) {exit;}
14 -
15 -$wpdb->delete($wpdb->prefix.'wppm_project_categories', array( 'id' => "$cat_id"));
16 -
17 -
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')|| ($current_user->ID && $current_user->has_cap('wppm_admin')))) {exit;}
8 +if ( check_ajax_referer( 'wppm_delete_category', '_ajax_nonce', false ) != 1 ) {
9 + wp_send_json_error( 'Unauthorised request!', 401 );
10 +}
11 +$cat_id = isset($_POST) && isset($_POST['cat_id']) ? absint(sanitize_text_field(wp_unslash($_POST['cat_id']))) : 0;
12 +$cat_id = absint($cat_id);
13 +if (!$cat_id) {exit;}
14 +
15 +$wpdb->delete($wpdb->prefix.'wppm_project_categories', array( 'id' => absint($cat_id)));
16 +
17 +