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
taskbuilder / includes / admin / email_notifications / wppm_set_en_general_setting.php

wppm_set_en_general_setting.php in Taskbuilder – Project Management & Task Management Tool With Kanban Board 6.0.6, at includes/admin/email_notifications/wppm_set_en_general_setting.php

34 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit; // Exit if accessed directly
4 }
5
6 global $current_user, $wppmfunction;
7 if ( check_ajax_referer( 'wppm_set_en_general_settings', '_ajax_nonce', false ) != 1 ) {
8 wp_send_json_error( 'Unauthorised request!', 401 );
9 }
10 if (!($current_user->ID && $current_user->has_cap('wppm_admin') || $current_user->has_cap('manage_options'))) {
11 exit;
12 }
13
14 // From Name
15 $from_name = isset($_POST) && isset($_POST['wppm_en_from_name']) ? sanitize_text_field(wp_unslash($_POST['wppm_en_from_name'])) : '';
16 update_option('wppm_en_from_name',$from_name);
17
18 // From Email
19 $from_email = isset($_POST) && isset($_POST['wppm_en_from_email']) ? sanitize_text_field(wp_unslash($_POST['wppm_en_from_email'])) : '';
20 update_option('wppm_en_from_email',$from_email);
21
22 // Block emails
23 $ignore_emails = isset($_POST) && isset($_POST['wppm_en_ignore_emails']) ? explode("\n", (wp_unslash($_POST['wppm_en_ignore_emails']))) : array();
24 $ignore_emails = $wppmfunction->sanitize_array($ignore_emails);
25 update_option('wppm_en_ignore_emails',$ignore_emails);
26
27 do_action('wppm_set_en_gerneral_settings');
28
29 echo wp_json_encode( array(
30 'sucess_status' => 1,
31 'messege' => esc_html__( 'Settings saved.', 'taskbuilder' ),
32 ) );
33 wp_die();
34