| 1 |
<?php |
| 2 |
|
| 3 |
if ( ! defined( 'ABSPATH' ) ) { |
| 4 |
exit; // Exit if accessed directly |
| 5 |
} |
| 6 |
|
| 7 |
if ( |
| 8 |
check_ajax_referer('set_appearance_signup', '_ajax_nonce', false) != 1 |
| 9 |
) wp_send_json_error('Unauthorised request!', 400); |
| 10 |
|
| 11 |
global $current_user, $wpscfunction; |
| 12 |
if (!($current_user->ID && $current_user->has_cap('manage_options'))) { |
| 13 |
exit; |
| 14 |
} |
| 15 |
|
| 16 |
$wpsc_appearance_signup = isset($_POST) && isset($_POST['wpsc_appearance_signup']) ? $wpscfunction->sanitize_array($_POST['wpsc_appearance_signup']) : array(); |
| 17 |
|
| 18 |
update_option('wpsc_appearance_signup',$wpsc_appearance_signup); |
| 19 |
|
| 20 |
do_action('wpsc_set_appearance_sign_up'); |
| 21 |
|
| 22 |
echo '{ "sucess_status":"1","messege":"'.__('Settings saved.','supportcandy').'" }'; |