From 622d8dc3c8cdac01f46f0991fbf00e5475437ea8 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 18 Jun 2021 19:20:02 +0900 Subject: [PATCH] =?UTF-8?q?WP=5FPLUGIN=E3=80=80=E3=83=91=E3=82=B9=E3=83=AF?= =?UTF-8?q?=E3=83=BC=E3=83=89=E4=BF=9D=E8=AD=B7=E3=83=9A=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E3=81=AE=E3=83=86=E3=82=AD=E3=82=B9=E3=83=88=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・サニタイズとエスケープ ・完了メッセージの閉じるボタン追加 --- convert-protection-text.php | 105 ++++++++++++++++++------------------ 1 file changed, 54 insertions(+), 51 deletions(-) diff --git a/convert-protection-text.php b/convert-protection-text.php index 053eff7..5044d3c 100644 --- a/convert-protection-text.php +++ b/convert-protection-text.php @@ -30,19 +30,20 @@ class CNV_Protection_Text { } public function show_text_option_page() { - //$_POST['_cnv_protect_options'])があったら保存 - if ( isset( $_POST['_cnv_protect_options'] ) ) { + $update_option = filter_input( INPUT_POST, '_cnv_protect_options', FILTER_SANITIZE_STRING, FILTER_REQUIRE_ARRAY ); + if ( ! empty( $update_option ) ) { check_admin_referer( 'cnv_options' ); - $opt = $_POST['_cnv_protect_options']; - update_option( '_cnv_protect_options', $opt ); + update_option( '_cnv_protect_options', $update_option ); ?> -

設定を保存しました

+

設定を保存しました

+ -
-

-

アクセス権限ページ設定

-
+
+

+

アクセス権限ページ設定

+ - - - - + + + + + + + + + +
+ + + + - - - - + + + + - - - - - - - - - -
- - + + - - + + -
メッセージ +
メッセージ -
ボタンラベル - -
ボタン名 - -
-

- - + cols="60"> +
ボタンラベル + +
ボタン名 + +
+

+ +
-

' . nl2br( $alert_text ) . '

-

'; +

' . nl2br( esc_html( $alert_text ) ) . '

+

'; } }