← All changes
|
includes/admin/settings/wppm_reset_ap_grid_view.php
+26
-26
6.0.4
→
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 | - | |
| 12 | -if ( check_ajax_referer( 'wppm_reset_ap_grid_view', 'wppm_reset_grid_ajax_nonce', false ) != 1 ) { | |
| 13 | - wp_send_json_error( 'Unauthorised request!', 401 ); | |
| 14 | -} | |
| 15 | - | |
| 16 | -update_option( | |
| 17 | - 'wppm-ap-grid-view', | |
| 18 | - array( | |
| 19 | - 'menu-button-bg-color' =>'#0052CC', | |
| 20 | - 'menu-button-hover-color' =>'#0065ff', | |
| 21 | - 'menu-button-text-color' =>'#fff', | |
| 22 | - 'grid-background-color' => '#fff', | |
| 23 | - 'grid-header-text-color' => '#2C3E50' | |
| 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 | + | |
| 12 | +if ( check_ajax_referer( 'wppm_reset_ap_grid_view', 'wppm_reset_grid_ajax_nonce', false ) != 1 ) { | |
| 13 | + wp_send_json_error( 'Unauthorised request!', 401 ); | |
| 14 | +} | |
| 15 | + | |
| 16 | +update_option( | |
| 17 | + 'wppm-ap-grid-view', | |
| 18 | + array( | |
| 19 | + 'menu-button-bg-color' =>'#0052CC', | |
| 20 | + 'menu-button-hover-color' =>'#0065ff', | |
| 21 | + 'menu-button-text-color' =>'#fff', | |
| 22 | + 'grid-background-color' => '#fff', | |
| 23 | + 'grid-header-text-color' => '#2C3E50' | |
| 24 | + ) | |
| 25 | +); | |
| 26 | +wp_die(); | |
| 27 | 27 | ?> |