← All changes
|
includes/admin/settings/wppm_reset_ap_settings.php
+26
-26
5.0.6
→
6.0.6
View file →
| @@ -1,27 +1,27 @@ | ||
| 1 | -<?php | |
| 2 | -if ( ! defined( 'ABSPATH' ) ) { | |
| 3 | - exit; // Exit if accessed directly | |
| 4 | -} | |
| 5 | - | |
| 6 | -global $current_user,$wpdb,$wppmfunction; | |
| 7 | - | |
| 8 | -if (!($current_user->ID && $current_user->has_cap('manage_options') || ($current_user->ID && $current_user->has_cap('wppm_admin')))) { | |
| 9 | - exit; | |
| 10 | -} | |
| 11 | -if ( check_ajax_referer( 'wppm_reset_ap_settings', '_ajax_nonce', false ) != 1 ) { | |
| 12 | - wp_send_json_error( 'Unauthorised request!', 401 ); | |
| 13 | -} | |
| 14 | -update_option( | |
| 15 | - 'wppm-ap-settings', | |
| 16 | - array( | |
| 17 | - 'tab-background-color' => '#0052CC', | |
| 18 | - 'tab-text-color' => '#fff', | |
| 19 | - 'add-new-button-bg-color' =>'#0052CC', | |
| 20 | - 'add-new-button-text-color' =>'#fff', | |
| 21 | - 'add-new-button-hover-color'=>'#0065ff', | |
| 22 | - 'save-changes-button-bg-color'=>'#306EFF', | |
| 23 | - 'save-changes-button-text-color'=>'#fff' | |
| 24 | - ) | |
| 25 | -); | |
| 26 | -wp_die(); | |
| 1 | +<?php | |
| 2 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 3 | + exit; // Exit if accessed directly | |
| 4 | +} | |
| 5 | + | |
| 6 | +global $current_user,$wpdb,$wppmfunction; | |
| 7 | + | |
| 8 | +if (!($current_user->ID && $current_user->has_cap('manage_options') || ($current_user->ID && $current_user->has_cap('wppm_admin')))) { | |
| 9 | + exit; | |
| 10 | +} | |
| 11 | +if ( check_ajax_referer( 'wppm_reset_ap_settings', '_ajax_nonce', false ) != 1 ) { | |
| 12 | + wp_send_json_error( 'Unauthorised request!', 401 ); | |
| 13 | +} | |
| 14 | +update_option( | |
| 15 | + 'wppm-ap-settings', | |
| 16 | + array( | |
| 17 | + 'tab-background-color' => '#0052CC', | |
| 18 | + 'tab-text-color' => '#fff', | |
| 19 | + 'add-new-button-bg-color' =>'#0052CC', | |
| 20 | + 'add-new-button-text-color' =>'#fff', | |
| 21 | + 'add-new-button-hover-color'=>'#0065ff', | |
| 22 | + 'save-changes-button-bg-color'=>'#306EFF', | |
| 23 | + 'save-changes-button-text-color'=>'#fff' | |
| 24 | + ) | |
| 25 | +); | |
| 26 | +wp_die(); | |
| 27 | 27 | ?> |