From 7203f02e087db74282b516e5256bc014c4dc9b02 Mon Sep 17 00:00:00 2001 From: sunxiyuan Date: Fri, 18 Sep 2020 11:49:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E5=A4=9A=E7=AB=99?= =?UTF-8?q?=E7=82=B9=E6=A8=A1=E5=BC=8F=E4=B8=8B=E6=97=A0=E6=B3=95=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E9=85=8D=E7=BD=AE=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wp-china-yes.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/wp-china-yes.php b/wp-china-yes.php index de7beef..0381b8b 100644 --- a/wp-china-yes.php +++ b/wp-china-yes.php @@ -262,6 +262,15 @@ class WP_CHINA_YES { } public function options_page_html() { + if ($_SERVER['REQUEST_METHOD'] === 'POST') { + update_option("wpapi", sanitize_text_field($_POST['wpapi'])); + update_option("super_admin", sanitize_text_field($_POST['super_admin'])); + update_option("super_gravatar", sanitize_text_field($_POST['super_gravatar'])); + update_option("super_googlefonts", sanitize_text_field($_POST['super_googlefonts'])); + + echo '

设置已保存

'; + } + if (!current_user_can('manage_options')) { return; } @@ -270,7 +279,7 @@ class WP_CHINA_YES { ?>

-
+