From 3c95035bba9ff40230bc6f17b510103cfaf108f3 Mon Sep 17 00:00:00 2001 From: sunxiyuan Date: Fri, 27 Mar 2020 15:48:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4options=E7=9A=84=E5=AD=98?= =?UTF-8?q?=E5=82=A8=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/index.php b/index.php index e9154d3..42d35a2 100644 --- a/index.php +++ b/index.php @@ -149,10 +149,10 @@ EOT; self::set_wp_option( sanitize_text_field(trim($_POST['community'])), - sanitize_text_field(trim($_POST['custom_api_server'])), - sanitize_text_field(trim($_POST['custom_download_server'])), sanitize_text_field(trim($_POST['api_server'])), - sanitize_text_field(trim($_POST['download_server'])) + sanitize_text_field(trim($_POST['download_server'])), + sanitize_text_field(trim($_POST['custom_api_server'])), + sanitize_text_field(trim($_POST['custom_download_server'])) ); self::success(); @@ -182,17 +182,17 @@ EOT; private static function set_wp_option( $community = 0, - $custom_api_server = '', - $custom_download_server = '', $api_server = 'api.w.org.ibadboy.net', - $download_server = 'd.w.org.ibadboy.net' + $download_server = 'd.w.org.ibadboy.net', + $custom_api_server = '', + $custom_download_server = '' ) { $options = array(); $options['community'] = (int) $community; - $options['custom_api_server'] = $custom_api_server; - $options['custom_download_server'] = $custom_download_server; $options['api_server'] = $api_server; $options['download_server'] = $download_server; + $options['custom_api_server'] = $custom_api_server; + $options['custom_download_server'] = $custom_download_server; update_option("wp_china_yes_options", $options); } } \ No newline at end of file