WP PLUGIN エスケープ処理の修正

・echo時にエスケープするようメソッド修正
・HTMLタグないのエスケープをesc_attr()に変更
This commit is contained in:
2021-06-19 09:18:48 +09:00
parent f9fe860c81
commit ff1dcdc5f4
8 changed files with 144 additions and 148 deletions
+13 -2
View File
@@ -38,9 +38,13 @@ if ( ! class_exists( 'APOP_POST' ) ) {
public function insert_meta_fields() {
//通常ソート
$this->create_order_field_data( get_option( '_apop_normal_order_param' ), 'normal' );
if ( get_option( '_apop_normal_order' ) == '1' ) {
$this->create_order_field_data( get_option( '_apop_normal_order_param' ), 'normal' );
}
//検索ソート
$this->create_order_field_data( get_option( '_apop_search_order_param' ), 'search' );
if ( get_option( '_apop_tax_sort_type' ) == '1' ) {
$this->create_order_field_data( get_option( '_apop_search_order_param' ), 'search' );
}
//カテゴリー、タグ、カスタム分類
$this->create_order_tax_field_data( get_option( '_apop_tax_order_param' ) );
@@ -75,7 +79,14 @@ if ( ! class_exists( 'APOP_POST' ) ) {
private function create_order_tax_field_data( $param, $update = false ) {
$term_ids = $this->create_post_term_ids();
$sort_types = get_option( '_apop_tax_sort_type' );
foreach ( $term_ids as $term_id ) {
if(!isset($sort_types[$term_id])){
continue;
}
if($sort_types[$term_id] == '1'){
break;
}
foreach ( $this->order_param_keys as $order_param_key ) {
if ( isset( $param[ $term_id ][ $order_param_key ]['field']['meta_key'] ) &&
! empty( $param[ $term_id ][ $order_param_key ]['field']['meta_key'] ) ) {
+59 -64
View File
@@ -15,9 +15,7 @@ if ( ! class_exists( 'APOP_UI' ) ) {
return $type_data;
}
public static function get_all_search_normal_posts(
$key
): string {
public static function get_all_search_normal_posts( $key ) {
$meta_key = '_apop_post_' . $key;
$args = self::create_search_normal_args( $meta_key );
$posts_data = get_posts( $args );
@@ -25,13 +23,14 @@ if ( ! class_exists( 'APOP_UI' ) ) {
foreach ( $posts_data as $i => $post_data ) {
$order = $i + 1;
$no_order = self::is_sort_post_registered( $post_data->ID, $meta_key ) ? '' : ' no_order';
$list[] = '<li class="product-list' . esc_html( $no_order ) . '">' . esc_html( self::crate_non_registerd_mark( $no_order ) ) . '
<span class="sort-num-label">' . esc_html( $order ) . '</span>' . esc_html( $post_data->post_title ) . '
<input type="hidden" class="list_order" name="_apop_post_' . esc_html( $key ) . '[post_sort][' . esc_html( $post_data->ID ) . ']" value="' . esc_html( $order ) . '">
</li>';
echo '<li class="product-list' . esc_attr( $no_order ) . '">'
. esc_attr( self::crate_non_registerd_mark( $no_order ) )
. '<span class="sort-num-label">' . esc_html( $order ) . '</span>' . esc_html( $post_data->post_title )
. '<input type="hidden" class="list_order"
name="_apop_post_' . esc_attr( $key ) . '[post_sort][' . esc_attr( $post_data->ID ) . ']"
value="' . esc_attr( $order ) . '">
</li>';
}
return implode( PHP_EOL, $list );
}
private static function crate_non_registerd_mark( $no_order ): string {
@@ -270,7 +269,7 @@ value="' . esc_html( $sort_num ) . '">
);
}
public static function create_search_normal_list( $type, $id = null ): array {
public static function create_search_normal_list( $type, $id = null ) {
$name_keys = self::create_name_keys( $id, $type );
$name_key = $name_keys['name_key'];
$get_option_key = $name_keys['get_option_key'];
@@ -298,67 +297,64 @@ value="' . esc_html( $sort_num ) . '">
$cnv_order_params = self::set_order_list_param( $order_param, $target_key );
$use = $cnv_order_params['use'];
$sort = $cnv_order_params['sort'];
$alert = $cnv_order_params['alert'];
$no_order_class = $cnv_order_params['no_order_class'];
$field_metakey_input = '';
$name_use_key = '_' . $name_key . '[' . $target_key . '][use]';
$name_sort_key = '_' . $name_key . '[' . $target_key . '][sort]';
if ( strpos( $target_key, 'custom_field' ) !== false ) {
$meta_key = $cnv_order_params[ $target_key ]['meta_key'];
$value_type = $cnv_order_params[ $target_key ]['value_type'];
$field_metakey_input = self::create_custom_field_sort_type( $name_key, $target_key, $meta_key, $value_type );
$target_key_check_class = 'custom_field_check';
} else {
$target_key_check_class = 'sort_' . $target_key . '_check';
}
$list[] = '<li class="product-list' . esc_html( $no_order_class ) . '">
<div class="product-list-type-label"><b>' . esc_html( $target_values[ $target_key ] ) . '</b></div>
<div class="product-list-sort-type">
<label>
<input type="hidden" name="' . esc_html( $name_use_key ) . '"
value="0"' . esc_html( self::set_search_normal_checked( $use, 0 ) ) . '>
<span class="en_dis_label">有効</span><input class="' . esc_html( $target_key_check_class ) . '"
type="checkbox" name="' . esc_html( $name_use_key ) . '" value="1"' . esc_html( self::set_search_normal_checked( $use, 1 ) ) . '>
</label>
<label>
<input class="order_param" type="radio"
name="' . esc_html( $name_sort_key ) . '"
value="1"' . esc_html( self::set_search_normal_checked( $sort, 1 ) ) . '>昇順</label>
<label>
<input class="order_param" type="radio"
name="' . esc_html( $name_sort_key ) . '"
value="2"' . esc_html( self::set_search_normal_checked( $sort, 2 ) ) . '>降順</label>
' . $field_metakey_input . '
</div>
</li>';
}
return array(
implode( PHP_EOL, $list ),
$alert,
);
echo '<li class="product-list' . esc_attr( $no_order_class ) . '">
<div class="product-list-type-label"><b>' . esc_attr( $target_values[ $target_key ] ) . '</b></div>
<div class="product-list-sort-type">
<label>
<input type="hidden" name="' . esc_attr( $name_use_key ) . '"
value="0"' . esc_attr( self::set_search_normal_checked( $use, 0 ) ) . '>
<span class="en_dis_label">有効</span><input class="' . esc_html( $target_key_check_class ) . '"
type="checkbox" name="' . esc_attr( $name_use_key ) . '" value="1"' . esc_attr( self::set_search_normal_checked( $use, 1 ) ) . '>
</label>
<label>
<input class="order_param" type="radio"
name="' . esc_attr( $name_sort_key ) . '"
value="1"' . esc_attr( self::set_search_normal_checked( $sort, 1 ) ) . '>昇順</label>
<label>
<input class="order_param" type="radio"
name="' . esc_attr( $name_sort_key ) . '"
value="2"' . esc_attr( self::set_search_normal_checked( $sort, 2 ) ) . '>降順</label>';
if ( strpos( $target_key, 'custom_field' ) !== false ) {
self::create_custom_field_sort_type( $name_key, $target_key, $cnv_order_params );
}
echo '</div>
</li>';
}
}
private static function create_custom_field_sort_type( $name_key, $target_key, $meta_key, $value_type ): string {
private static function create_custom_field_sort_type( $name_key, $target_key, $cnv_order_params ) {
$meta_key = $cnv_order_params[ $target_key ]['meta_key'];
$value_type = $cnv_order_params[ $target_key ]['value_type'];
$name_meta_key = '_' . $name_key . '[' . $target_key . '][field][meta_key]';
$name_value_type = '_' . $name_key . '[' . $target_key . '][field][value_type]';
return '<div class="sort_custom_field">
<div class="sort_custom_field_inner"><div class="sort_custom_field_inner_label">カスタムフィールドキー:</div>
<input type="text" class="custom_field_key" name="' . esc_html( $name_meta_key ) . '" value="' . esc_html( $meta_key ) . '">
</div>
<div class="sort_custom_field_inner">
<div class="sort_custom_field_inner_label">値タイプ:</div>
<label><input type="radio"
class="custom_field_meta_value"
name="' . esc_html( $name_value_type ) . '"
value="meta_value"' . esc_html( self::set_search_normal_checked( $value_type, 'meta_value' ) ) . '>テキスト</label>
<label><input type="radio"
class="custom_field_meta_value"
name="' . esc_html( $name_value_type ) . '"
value="meta_value_num"' . esc_html( self::set_search_normal_checked( $value_type, 'meta_value_num' ) ) . '>数値</label>
</div>
</div>';
echo '<div class="sort_custom_field">
<div class="sort_custom_field_inner"><div class="sort_custom_field_inner_label">カスタムフィールドキー:</div>
<input type="text" class="custom_field_key" name="' . esc_attr( $name_meta_key ) . '" value="' . esc_attr( $meta_key ) . '">
</div>
<div class="sort_custom_field_inner">
<div class="sort_custom_field_inner_label">値タイプ:</div>
<label><input type="radio"
class="custom_field_meta_value"
name="' . esc_attr( $name_value_type ) . '"
value="meta_value"' . esc_attr( self::set_search_normal_checked( $value_type, 'meta_value' ) ) . '>テキスト</label>
<label><input type="radio"
class="custom_field_meta_value"
name="' . esc_attr( $name_value_type ) . '"
value="meta_value_num"' . esc_attr( self::set_search_normal_checked( $value_type, 'meta_value_num' ) ) . '>数値</label>
</div>
</div>';
}
private static function set_order_list_param( $order_param, $target_key ): array {
@@ -366,9 +362,9 @@ value="meta_value_num"' . esc_html( self::set_search_normal_checked( $value_type
$param = array(
'use' => 0,
'sort' => 2,
'alert' => '並べ替えを登録するには「変更を保存」をクリックしてください。',
'no_order_class' => ' no_order',
);
if ( strpos( $target_key, 'custom_field' ) !== false ) {
$param[ $target_key ] = array(
'meta_key' => '',
@@ -380,7 +376,6 @@ value="meta_value_num"' . esc_html( self::set_search_normal_checked( $value_type
$param = array(
'use' => $order_param[ $target_key ]['use'] ?? 0,
'sort' => $order_param[ $target_key ]['sort'] ?? 2,
'alert' => ! $order_param[ $target_key ]['use'] ? '並べ替えを登録するには「変更を保存」をクリックしてください。' : '',
'no_order_class' => ! $order_param[ $target_key ]['use'] ? ' no_order' : '',
);
if ( strpos( $target_key, 'custom_field' ) !== false ) {
@@ -448,11 +443,11 @@ value="meta_value_num"' . esc_html( self::set_search_normal_checked( $value_type
}
}
public static function is_disp_per_page( &$disp, $disp_per_page ) {
if ( $disp_per_page ) {
$disp = true;
}
}
// public static function is_disp_per_page( &$disp, $disp_per_page ) {
// if ( $disp_per_page ) {
// $disp = true;
// }
// }
}
}
+7 -11
View File
@@ -16,7 +16,7 @@ $submit_type = APOP_UI::input_post_filter( 'apop_submit_type', 'str' );
<form action="" method="post">
<?php wp_nonce_field( 'sh_options' ); ?>
<input id="apop_submit_type" type="hidden" name="apop_submit_type"
value="<?php echo esc_html( $submit_type ); ?>">
value="<?php echo esc_attr( $submit_type ); ?>">
<div class="post-order-box">
<div class="list-orders-outer">
<div class="list-orders-inner">
@@ -27,13 +27,12 @@ $submit_type = APOP_UI::input_post_filter( 'apop_submit_type', 'str' );
?>
<?php include APOP_PLUGIN_PATH . 'template/order_parts_menu.php'; ?>
<hr>
<p>並べ替えを登録するには「変更を保存」をクリックしてください</p>
<div class="sort_box">
<?php list( $list, $alert) = APOP_UI::create_search_normal_list( 'normal' ); ?>
<p><?php echo esc_html( $alert ); ?></p>
<div class="enable_box">
<h4>有効</h4>
<ul class="post-order-list search_normal_sort">
<?php echo $list; ?>
<?php APOP_UI::create_search_normal_list( 'normal' ); ?>
</ul>
</div>
<div class="disable_box">
@@ -42,9 +41,8 @@ $submit_type = APOP_UI::input_post_filter( 'apop_submit_type', 'str' );
</div>
</div>
<div class="sort_box">
<div class="no_registered_exp">&#9632;は未登録項目です。ドラッグして並び順を変更後に「変更を保存」をクリックしてください。</div>
<ul class="post-order-list drag_sort">
<?php echo APOP_UI::get_all_search_normal_posts( 'normal' ); ?>
<?php APOP_UI::get_all_search_normal_posts( 'normal' ); ?>
</ul>
</div>
</div>
@@ -60,13 +58,12 @@ $submit_type = APOP_UI::input_post_filter( 'apop_submit_type', 'str' );
?>
<?php include APOP_PLUGIN_PATH . 'template/order_parts_menu.php'; ?>
<hr>
<p>並べ替えを登録するには「変更を保存」をクリックしてください</p>
<div class="sort_box">
<?php list( $list, $alert) = APOP_UI::create_search_normal_list( 'search' ); ?>
<p><?php echo esc_html( $alert ); ?></p>
<div class="enable_box">
<h4>有効</h4>
<ul class="post-order-list search_normal_sort">
<?php echo $list; ?>
<?php APOP_UI::create_search_normal_list( 'search' ); ?>
</ul>
</div>
<div class="disable_box">
@@ -75,9 +72,8 @@ $submit_type = APOP_UI::input_post_filter( 'apop_submit_type', 'str' );
</div>
</div>
<div class="sort_box">
<div class="no_registered_exp">&#9632;は未登録項目です。ドラッグして並び順を変更後に「変更を保存」をクリックしてください。</div>
<ul class="post-order-list drag_sort">
<?php echo APOP_UI::get_all_search_normal_posts( 'search' ); ?>
<?php APOP_UI::get_all_search_normal_posts( 'search' ); ?>
</ul>
</div>
</div>
+3 -3
View File
@@ -1,11 +1,11 @@
<?php if ( isset( $order_target, $order_target_type ) ): ?>
<ul class="sort_menu_list"
data-order_target="<?php echo esc_html($order_target); ?>">
data-order_target="<?php echo esc_attr( $order_target ); ?>">
<li><label>
<input class="sort_menu" type="radio" name="<?php echo esc_html($order_target_type); ?>"
<input class="sort_menu" type="radio" name="<?php echo esc_attr( $order_target_type ); ?>"
value="1"<?php checked( $order_target, 1 ); ?>>標準+カスタムフィールドソート</label></li>
<li><label>
<input class="sort_menu" type="radio" name="<?php echo esc_html($order_target_type); ?>"
<input class="sort_menu" type="radio" name="<?php echo esc_attr( $order_target_type ); ?>"
value="2"<?php checked( $order_target, 2 ); ?>>ドラッグソート</label></li>
</ul>
<?php endif;
+8 -7
View File
@@ -2,7 +2,6 @@
<?php foreach ( $tax_lists as $tax_key => $tax_list ) : ?>
<div class="list-orders-outer">
<?php if ( count( $tax_list ) > 0 ): ?>
<div class="no_registered_exp">&#9632;は未登録項目です。ドラッグして並び順を変更後に「変更を保存」をクリックしてください。</div>
<?php foreach ( $tax_list as $tax_data ): ?>
<div class="list-orders-inner">
<h3><?php echo esc_html( $tax_data->name ); ?></h3>
@@ -15,33 +14,35 @@
}
?>
<ul class="sort_menu_list"
data-order_target="<?php echo esc_html( $order_target ); ?>">
data-order_target="<?php echo esc_attr( $order_target ); ?>">
<li>
<label>
<input class="sort_menu" type="radio"
name="_apop_tax_sort_type[<?php echo esc_html( $tax_data->term_id ); ?>]"
name="_apop_tax_sort_type[<?php echo esc_attr( $tax_data->term_id ); ?>]"
value="1"<?php checked( $order_target, 1 ); ?>>ドラッグソート</label>
</li>
<li>
<label>
<input class="sort_menu" type="radio"
name="_apop_tax_sort_type[<?php echo esc_html( $tax_data->term_id ); ?>]"
name="_apop_tax_sort_type[<?php echo esc_attr( $tax_data->term_id ); ?>]"
value="2"<?php checked( $order_target, 2 ); ?>>標準+カスタムフィールドソート</label>
</li>
</ul>
<div class="sort_box">
<hr>
<p>並べ替えを登録するには「変更を保存」をクリックしてください</p>
<ul class="post-order-list drag_sort">
<?php echo APOP_UI::create_order_list( $tax_data, $tax_key ); ?>
</ul>
</div>
<div class="sort_box">
<?php list( $list, $alert ) = APOP_UI::create_search_normal_list( 'tax', $tax_data->term_id ); ?>
<p><?php echo esc_html( $alert ); ?></p>
<hr>
<p>並べ替えを登録するには「変更を保存」をクリックしてください</p>
<div class="enable_box">
<h4>有効</h4>
<ul class="post-order-list search_normal_sort">
<?php echo $list; ?>
<?php APOP_UI::create_search_normal_list( 'tax', $tax_data->term_id ); ?>
</ul>
</div>
<div class="disable_box">
+39 -42
View File
@@ -1,47 +1,44 @@
<div class="post-setting-box">
<form action="" method="post">
<?php
wp_nonce_field( 'sh_options' );
$opt_per_page = get_option( '_apop_per_page' );
$default_per_page = get_option( 'posts_per_page' );
?>
<h2>設定</h2>
<table class="form-table apop-form_table">
<tr>
<th scope="row">全体設定</th>
<td>
<dl class="apop_setting_list">
<dt>1ページ表示件数</dt>
<dd><?php $per_page_data = APOP_UI::create_cat_per_page( $opt_per_page, 'search' ); ?>
<ul>
<li>
<label>
<input class="per_page_search" type="radio" name="_apop_per_page[search]"
value="default"<?php checked( $per_page_data['_per_page'], 'default' ); ?>>表示設定に従う(<?php echo esc_html($default_per_page); ?>
</label>
</li>
<li><label>
<input class="per_page_search" type="radio" name="_apop_per_page[search]"
value="-1"<?php checked( $per_page_data['_per_page'], '-1' ); ?>>全件</label>
</li>
<li>
<label><input class="per_page_search" type="radio"
name="_apop_per_page[search]"
value="<?php echo esc_html($per_page_data['_checked']); ?>">表示数設定
<input class="per_page_search_input" type="text"
name="_apop_per_page[search]"
value="<?php echo esc_html($per_page_data['_per_page_num']); ?>" required>
</label>
</li>
</ul>
</dd>
</dl>
</td>
</tr>
<?php APOP_UI::disp_tax_setting( 'category', 'カテゴリー', '_apop_cat_order' ); ?>
<?php APOP_UI::disp_tax_setting( 'post_tag', 'タグ', '_apop_tag_order' ); ?>
<?php APOP_UI::disp_tax_setting( 'taxonomy', 'カスタム分類', '_apop_tax_order' ); ?>
</table>
<?php wp_nonce_field( 'sh_options' ); ?>
<h2>設定</h2>
<table class="form-table apop-form_table">
<tr>
<th scope="row">全体設定</th>
<td>
<dl class="apop_setting_list">
<dt>1ページ表示件数</dt>
<dd><?php $per_page_data = APOP_UI::create_cat_per_page( get_option( '_apop_per_page' ), 'search' ); ?>
<ul>
<li>
<label>
<input class="per_page_search" type="radio" name="_apop_per_page[search]"
value="default"<?php checked( $per_page_data['_per_page'], 'default' ); ?>>表示設定に従う(<?php echo esc_html( get_option( 'posts_per_page' ) ); ?>
件)</label>
</li>
<li><label>
<input class="per_page_search" type="radio" name="_apop_per_page[search]"
value="-1"<?php checked( $per_page_data['_per_page'], '-1' ); ?>>全件</label>
</li>
<li>
<label><input class="per_page_search" type="radio"
name="_apop_per_page[search]"
value="" <?php echo esc_attr( $per_page_data['_checked'] ); ?>>表示数設定
<input class="per_page_search_input" type="text"
name="_apop_per_page[search]"
value="<?php echo esc_attr( $per_page_data['_per_page_num'] ); ?>"
required>
</label>
</li>
</ul>
</dd>
</dl>
</td>
</tr>
<?php APOP_UI::disp_tax_setting( 'category', 'カテゴリー', '_apop_cat_order' ); ?>
<?php APOP_UI::disp_tax_setting( 'post_tag', 'タグ', '_apop_tag_order' ); ?>
<?php APOP_UI::disp_tax_setting( 'taxonomy', 'カスタム分類', '_apop_tax_order' ); ?>
</table>
<p class="submit"><input type="submit" name="Submit" class="button-primary" value="変更を保存"/>
</form>
</div>
+13 -17
View File
@@ -1,8 +1,4 @@
<?php if ( isset( $tax_data, $order_name, $order_tax ) ): ?>
<?php
$default_per_page = get_option( 'posts_per_page' );
$opt_per_page = get_option( '_apop_per_page' );
?>
<dl class="apop_setting_list">
<dt>対象</dt>
<dd>
@@ -11,48 +7,48 @@
<?php
$opt_cat = get_option( $order_name );
$check_slug = $opt_cat['target_cat'][ $tax_datum->term_id ] ?? '';
APOP_UI::is_disp_per_page( $disp, $check_slug );
?>
<li>
<div class="select_cat">
<label>
<input type="hidden"
name="<?php echo esc_html($order_name); ?>[target_cat][<?php echo esc_html($tax_datum->term_id); ?>]"
name="<?php echo esc_attr( $order_name ); ?>[target_cat][<?php echo esc_attr( $tax_datum->term_id ); ?>]"
value="0">
<input class="select_cat_checkbox" type="checkbox"
name="<?php echo esc_html($order_name); ?>[target_cat][<?php echo esc_html($tax_datum->term_id); ?>]"
name="<?php echo esc_attr( $order_name ); ?>[target_cat][<?php echo esc_attr( $tax_datum->term_id ); ?>]"
<?php checked( $check_slug, 1 ); ?>
value="1">
<?php echo esc_html($tax_datum->name); ?>
<?php echo esc_html( $tax_datum->name ); ?>
</label>
</div>
<?php $per_page_data = APOP_UI::create_tax_per_page( $opt_per_page, $order_tax, $tax_datum->term_id ); ?>
<?php $per_page_data = APOP_UI::create_tax_per_page( get_option( '_apop_per_page' ), $order_tax, $tax_datum->term_id ); ?>
<div class="select_per_page">
<ul>
<li>
<label>
<input class="per_page_cat" type="radio"
name="_apop_per_page[<?php echo esc_html($order_tax); ?>][<?php echo esc_html($tax_datum->term_id); ?>]"
value="default"<?php checked( $per_page_data['_per_page'], 'default' ); ?>>表示設定に従う(<?php echo esc_html($default_per_page); ?>
name="_apop_per_page[<?php echo esc_attr( $order_tax ); ?>][<?php echo esc_attr( $tax_datum->term_id ); ?>]"
value="default"<?php checked( $per_page_data['_per_page'], 'default' ); ?>>表示設定に従う(<?php echo esc_html( get_option( 'posts_per_page' ) ); ?>
件)</label>
</li>
<li><label>
<input class="per_page_cat" type="radio"
name="_apop_per_page[<?php echo esc_html($order_tax); ?>][<?php echo esc_html($tax_datum->term_id); ?>]"
name="_apop_per_page[<?php echo esc_attr( $order_tax ); ?>][<?php echo esc_attr( $tax_datum->term_id ); ?>]"
value="all"<?php checked( $per_page_data['_per_page'], 'all' ); ?>>全体設定に従う</label>
</li>
<li><label>
<input class="per_page_cat" type="radio"
name="_apop_per_page[<?php echo esc_html($order_tax); ?>][<?php echo esc_html($tax_datum->term_id); ?>]"
name="_apop_per_page[<?php echo esc_attr( $order_tax ); ?>][<?php echo esc_attr( $tax_datum->term_id ); ?>]"
value="-1"<?php checked( $per_page_data['_per_page'], '-1' ); ?>>全件</label>
</li>
<li class="set_number_list">
<label><input class="per_page_cat set_number" type="radio"
name="_apop_per_page[<?php echo esc_html($order_tax); ?>][<?php echo esc_html($tax_datum->term_id); ?>]"
value=""<?php echo esc_html($per_page_data['_checked']); ?>>表示数設定
name="_apop_per_page[<?php echo esc_attr( $order_tax ); ?>][<?php echo esc_attr( $tax_datum->term_id ); ?>]"
value=""<?php echo esc_attr( $per_page_data['_checked'] ); ?>>表示数設定
<input class="per_page_cat_input" type="text"
name="_apop_per_page[<?php echo esc_html($order_tax); ?>][<?php echo esc_html($tax_datum->term_id); ?>]"
value="<?php echo esc_html($per_page_data['_per_page_num']); ?>" required>
name="_apop_per_page[<?php echo esc_attr( $order_tax ); ?>][<?php echo esc_attr( $tax_datum->term_id ); ?>]"
value="<?php echo esc_attr( $per_page_data['_per_page_num'] ); ?>"
required>
</label>
</li>
</ul>
+2 -2
View File
@@ -9,8 +9,8 @@
<?php if ( ! empty( $item ) ): ?>
<li><label><?php echo esc_html( $item ); ?></label>
<input type="text"
name="<?php echo esc_html( APOP_CUSTOM_FIELD_PREFIX . $item ); ?>"
value="<?php echo esc_html( $this->get_custom_field_data( $item ) ); ?>"/>
name="<?php echo esc_attr( APOP_CUSTOM_FIELD_PREFIX . $item ); ?>"
value="<?php echo esc_attr( $this->get_custom_field_data( $item ) ); ?>"/>
</li>
<?php endif; ?>
<?php endforeach; ?>