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_page_settings.php +28 -24 5.0.16.0.6 View file →
@@ -1,24 +1,28 @@
1 -<?php
2 -if ( ! defined( 'ABSPATH' ) ) {
3 - exit; // Exit if accessed directly
4 -}
5 -
6 -global $current_user,$wppmfunction;
7 -if (!($current_user->ID && $current_user->has_cap('manage_options') || ($current_user->ID && $current_user->has_cap('wppm_admin')))) {
8 - exit;
9 -}
10 -if ( check_ajax_referer( 'wppm_set_page_settings', '_ajax_nonce', false ) != 1 ) {
11 - wp_send_json_error( 'Unauthorised request!', 401 );
12 -}
13 -
14 -$page_settings = apply_filters(
15 - 'wppm_set_page_settings',
16 - array(
17 - 'task-url-page' => isset( $_POST['task-url-page'] ) ? intval( $_POST['task-url-page'] ) : 0,
18 - 'project-url-page' => isset( $_POST['project-url-page'] ) ? intval( $_POST['project-url-page'] ) : 0
19 - )
20 -);
21 -update_option( 'wppm-page-settings', $page_settings );
22 -do_action('wppm_set_page_settings');
23 -
24 -echo '{ "sucess_status":"1","messege":"'.__('Settings saved.','taskbuilder').'" }';
1 +<?php
2 +if ( ! defined( 'ABSPATH' ) ) {
3 + exit; // Exit if accessed directly
4 +}
5 +
6 +global $current_user,$wppmfunction;
7 +if (!($current_user->ID && $current_user->has_cap('manage_options') || ($current_user->ID && $current_user->has_cap('wppm_admin')))) {
8 + exit;
9 +}
10 +if ( check_ajax_referer( 'wppm_set_page_settings', '_ajax_nonce', false ) != 1 ) {
11 + wp_send_json_error( 'Unauthorised request!', 401 );
12 +}
13 +
14 +$page_settings = apply_filters(
15 + 'wppm_set_page_settings',
16 + array(
17 + 'task-url-page' => isset( $_POST['task-url-page'] ) ? intval( $_POST['task-url-page'] ) : 0,
18 + 'project-url-page' => isset( $_POST['project-url-page'] ) ? intval( $_POST['project-url-page'] ) : 0
19 + )
20 +);
21 +update_option( 'wppm-page-settings', $page_settings );
22 +do_action('wppm_set_page_settings');
23 +
24 +echo wp_json_encode( array(
25 + 'sucess_status' => 1,
26 + 'messege' => esc_html__( 'Settings saved.', 'taskbuilder' ),
27 +) );
28 +wp_die();