WordPressプラグイン指摘事項修正
This commit is contained in:
@@ -1,13 +1,18 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
} // Exit if accessed directly
|
||||
?>
|
||||
<div class="wrap">
|
||||
<h2>限定公開ページテキストカスタマイズ</h2>
|
||||
<form action="" method="post">
|
||||
<?php
|
||||
wp_nonce_field( 'cnv_options' );
|
||||
$opt = get_option( '_cnv_protect_options' );
|
||||
wp_nonce_field( 'conv_options' );
|
||||
$opt = get_option( 'conv_protection_options' );
|
||||
$show_radio = $opt['flag'] ?? 1;
|
||||
$show_text = $opt['text'] ?? cnv_protection_txt_settings::ALERT_TEXT;
|
||||
$show_label = $opt['label'] ?? cnv_protection_txt_settings::BTN_LABEL;
|
||||
$show_btn = $opt['btn'] ?? cnv_protection_txt_settings::BTN_TEXT;
|
||||
$show_text = $opt['text'] ?? conv_protection_txt_settings::ALERT_TEXT;
|
||||
$show_label = $opt['label'] ?? conv_protection_txt_settings::BTN_LABEL;
|
||||
$show_btn = $opt['btn'] ?? conv_protection_txt_settings::BTN_TEXT;
|
||||
?>
|
||||
<table class="form-table">
|
||||
<tr valign="top">
|
||||
@@ -15,17 +20,17 @@
|
||||
<td>
|
||||
<?php if ( $show_radio == 2 ) : ?>
|
||||
<label>
|
||||
<input type="radio" name="_cnv_protect_options[flag]" value="1">表示
|
||||
<input type="radio" name="conv_protection_options[flag]" value="1">表示
|
||||
</label>
|
||||
<label>
|
||||
<input type="radio" name="_cnv_protect_options[flag]" value="2" checked>非表示
|
||||
<input type="radio" name="conv_protection_options[flag]" value="2" checked>非表示
|
||||
</label>
|
||||
<?php elseif ( $show_radio == 1 ): ?>
|
||||
<label>
|
||||
<input type="radio" name="_cnv_protect_options[flag]" value="1" checked>表示
|
||||
<input type="radio" name="conv_protection_options[flag]" value="1" checked>表示
|
||||
</label>
|
||||
<label>
|
||||
<input type="radio" name="_cnv_protect_options[flag]" value="2">非表示
|
||||
<input type="radio" name="conv_protection_options[flag]" value="2">非表示
|
||||
</label>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
@@ -33,21 +38,21 @@
|
||||
<tr valign="top">
|
||||
<th scope="row">メッセージ</th>
|
||||
<td>
|
||||
<textarea name="_cnv_protect_options[text]" rows="4"
|
||||
<textarea name="conv_protection_options[text]" rows="4"
|
||||
cols="60"><?php echo esc_attr( $show_text ); ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row">ボタンラベル</th>
|
||||
<td>
|
||||
<input type="text" name="_cnv_protect_options[label]"
|
||||
<input type="text" name="conv_protection_options[label]"
|
||||
value="<?php echo esc_attr( $show_label ); ?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row">ボタン名</th>
|
||||
<td>
|
||||
<input type="text" name="_cnv_protect_options[btn]"
|
||||
<input type="text" name="conv_protection_options[btn]"
|
||||
value="<?php echo esc_attr( $show_btn ); ?>">
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1 +1,6 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
} // Exit if accessed directly
|
||||
?>
|
||||
<div id="settings_updated" class="updated notice is-dismissible"><p><strong>設定を保存しました</strong></p></div>
|
||||
|
||||
Reference in New Issue
Block a user