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_set_print_task_settings.php +20 -16 5.0.06.0.6 View file →
@@ -1,16 +1,20 @@
1 -<?php
2 -if ( ! defined( 'ABSPATH' ) ) {
3 - exit; // Exit if accessed directly
4 -}
5 -
6 -global $current_user, $wpdb,$wppmfunction;
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_set_print_task_settings', '_ajax_nonce', false ) != 1 ) {
9 - wp_send_json_error( 'Unauthorised request!', 401 );
10 -}
11 -$wppm_font_size = isset($_POST) && isset($_POST['wppm_print_body_font_size']) ? intval(sanitize_text_field($_POST['wppm_print_body_font_size'])) : '10';
12 -$wppm_print_settings = array(
13 - 'wppm_print_body_font_size' => $wppm_font_size
14 -);
15 -update_option('wppm_print_settings',$wppm_print_settings);
16 -echo '{ "sucess_status":"1","messege":"'.__('Print settings saved.','taskbuilder').'" }';
1 +<?php
2 +if ( ! defined( 'ABSPATH' ) ) {
3 + exit; // Exit if accessed directly
4 +}
5 +
6 +global $current_user, $wpdb,$wppmfunction;
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_set_print_task_settings', '_ajax_nonce', false ) != 1 ) {
9 + wp_send_json_error( 'Unauthorised request!', 401 );
10 +}
11 +$wppm_font_size = isset($_POST) && isset($_POST['wppm_print_body_font_size']) ? absint(sanitize_text_field(wp_unslash($_POST['wppm_print_body_font_size']))) : '10';
12 +$wppm_print_settings = array(
13 + 'wppm_print_body_font_size' => $wppm_font_size
14 +);
15 +update_option('wppm_print_settings',$wppm_print_settings);
16 +echo wp_json_encode( array(
17 + 'sucess_status' => 1,
18 + 'messege' => esc_html__( 'Print settings saved.', 'taskbuilder' ),
19 +) );
20 +wp_die();