mirror of
https://github.com/WenPai-org/wp-china-yes.git
synced 2025-08-04 20:19:53 +08:00
Update index.php
This commit is contained in:
parent
40ea4ec909
commit
9dca2bd285
1 changed files with 5 additions and 1 deletions
|
@ -16,6 +16,10 @@ WP_CHINA_YES::init();
|
|||
|
||||
class WP_CHINA_YES {
|
||||
public static function init() {
|
||||
$post_action = isset($_POST['action']) ? sanitize_text_field(trim($_POST['action'])) : ' ';
|
||||
if( defined( 'DOING_AJAX' ) && DOING_AJAX && !in_array($post_action,array('wpcy_set_config','wpcy_get_config'))){
|
||||
return;
|
||||
}
|
||||
if (is_admin()) {
|
||||
register_activation_hook(WP_CHINA_YES_BASE_FILE, array(
|
||||
__CLASS__,
|
||||
|
@ -208,4 +212,4 @@ EOT;
|
|||
$options['custom_download_server'] = $custom_download_server;
|
||||
update_option("wp_china_yes_options", $options);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue