← All changes
|
includes/admin/tasks/open_task/wppm_restore_task.php
+10
-10
5.0.6
→
6.0.6
View file →
| @@ -1,11 +1,11 @@ | ||
| 1 | -<?php | |
| 2 | -if ( ! defined( 'ABSPATH' ) ) { | |
| 3 | - exit; // Exit if accessed directly | |
| 4 | -} | |
| 5 | -global $current_user, $wppmfunction ,$wpdb; | |
| 6 | -$task_id = isset($_POST['id']) ? absint(sanitize_text_field(wp_unslash($_POST['id']))) : 0 ; | |
| 7 | -if (!(($current_user->ID && $current_user->has_cap('manage_options')) || $wppmfunction->has_permission('change_task_details',$task_id))) {exit;} | |
| 8 | -$values=array( | |
| 9 | - 'is_archieved'=>esc_sql(0) | |
| 10 | -); | |
| 1 | +<?php | |
| 2 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 3 | + exit; // Exit if accessed directly | |
| 4 | +} | |
| 5 | +global $current_user, $wppmfunction ,$wpdb; | |
| 6 | +$task_id = isset($_POST['id']) ? absint(sanitize_text_field(wp_unslash($_POST['id']))) : 0 ; | |
| 7 | +if (!(($current_user->ID && $current_user->has_cap('manage_options')) || $wppmfunction->has_permission('change_task_details',$task_id))) {exit;} | |
| 8 | +$values=array( | |
| 9 | + 'is_archieved'=>esc_sql(0) | |
| 10 | +); | |
| 11 | 11 | $wpdb->update($wpdb->prefix.'wppm_task', $values, array('id'=>esc_sql($task_id))); |