格式化代码

This commit is contained in:
sunxiyuan 2020-04-27 15:19:03 +08:00
parent a156d0b162
commit 05d7eda53e

View file

@ -20,7 +20,7 @@ class WP_CHINA_YES {
public function init() {
add_filter('pre_http_request', [$this, 'pre_http_request'], 10, 3);
$post_action = isset($_POST['action']) ? sanitize_text_field(trim($_POST['action'])) : ' ';
if( defined( 'DOING_AJAX' ) && DOING_AJAX && !in_array($post_action,['wpcy_set_config','wpcy_get_config'])){
if (defined('DOING_AJAX') && DOING_AJAX && ! in_array($post_action, ['wpcy_set_config', 'wpcy_get_config'])) {
return;
}
if (is_admin()) {