WP PLUGIN アーカイブページの投稿表示順設定
・検索と通常表示のオプションを追加 ・項目の表示順を修正 ・選択値によって表示/非表示の切り替えやフォームをDisabledにする等修正 ・アンインストーラーを追加
This commit is contained in:
+135
-126
@@ -1,15 +1,18 @@
|
||||
<?php
|
||||
$search_lists = APOP_UI::get_all_search_posts( 'registered' );
|
||||
$category_lists = array( 'category' => APOP_UI::get_cat_tag_list( 'cat', 'category' ) );
|
||||
$tag_lists = array( 'tag_id' => APOP_UI::get_cat_tag_list( 'tag', 'post_tag' ) );
|
||||
$taxonomy_lists = array( 'taxonomy' => APOP_UI::get_cat_tag_list( 'tax', 'taxonomy' ) );
|
||||
$submit_type = $_POST['submit_type'] ?? '0';
|
||||
$apop_search_order = get_option( '_apop_search_order' ) ?? '1';
|
||||
$normal_lists = APOP_UI::get_all_search_normal_posts( 'registered', 'normal' );
|
||||
$search_lists = APOP_UI::get_all_search_normal_posts( 'registered', 'search' );
|
||||
$category_lists = array( 'category' => APOP_UI::get_cat_tag_list( 'cat', 'category' ) );
|
||||
$tag_lists = array( 'tag_id' => APOP_UI::get_cat_tag_list( 'tag', 'post_tag' ) );
|
||||
$taxonomy_lists = array( 'taxonomy' => APOP_UI::get_cat_tag_list( 'tax', 'taxonomy' ) );
|
||||
$submit_type = APOP_UI::input_post_filter( 'submit_type', 'str' );
|
||||
$apop_search_order_check = APOP_UI::get_order_type( '_apop_search_order' );
|
||||
$apop_normal_check = APOP_UI::get_order_type( '_apop_normal_order' );
|
||||
?>
|
||||
<h2>並べ替え</h2>
|
||||
<nav class="post-order-nav">
|
||||
<ul>
|
||||
<li class="en">検索</li>
|
||||
<li class="en">通常</li>
|
||||
<li>検索</li>
|
||||
<li>カテゴリー</li>
|
||||
<li>タグ</li>
|
||||
<li>カスタム分類</li>
|
||||
@@ -22,115 +25,46 @@ $apop_search_order = get_option( '_apop_search_order' ) ?? '1';
|
||||
<div class="list-orders-inner search_inner">
|
||||
<form action="" method="post">
|
||||
<?php wp_nonce_field( 'sh_options' ); ?>
|
||||
<ul class="apop_search_order_target" data-search_order_target="<?php echo $apop_search_order; ?>">
|
||||
<ul class="apop_normal_order_target"
|
||||
data-normal_order_target="<?php echo $apop_normal_check; ?>">
|
||||
<li><label>
|
||||
<input class="apop_search_order" type="radio" name="_apop_search_order"
|
||||
value="1"<?php echo checked( $apop_search_order, 1 ); ?>>標準</label></li>
|
||||
<input class="apop_normal_order" type="radio" name="_apop_normal_order"
|
||||
value="1"<?php checked( $apop_normal_check, 1 ); ?>>標準</label></li>
|
||||
<li><label>
|
||||
<input class="apop_search_order" type="radio" name="_apop_search_order"
|
||||
value="2"<?php echo checked( $apop_search_order, 2 ); ?>>カスタム</label></li>
|
||||
<input class="apop_normal_order" type="radio" name="_apop_normal_order"
|
||||
value="2"<?php checked( $apop_normal_check, 2 ); ?>>カスタム</label></li>
|
||||
</ul>
|
||||
<hr>
|
||||
<div class="search_sort_box">
|
||||
<div class="normal_sort_box">
|
||||
<?php list( $list, $alert ) = APOP_UI::create_search_normal_list( 'normal' ); ?>
|
||||
<?php echo $alert; ?>
|
||||
<ul class="post-order-list search_normal_sort">
|
||||
<li class="product-list">
|
||||
<label>
|
||||
<input type="hidden" name="_apop_search_order_param[id][use]" value="0">
|
||||
<input type="checkbox" name="_apop_search_order_param[id][use]" value="1">
|
||||
<b>ID</b>
|
||||
</label>
|
||||
|
||||
<label><input class="apop_search_order_param" type="radio"
|
||||
name="_apop_search_order_param[id][sort]"
|
||||
value="1">昇順</label>
|
||||
|
||||
<label><input class="apop_search_order_param" type="radio"
|
||||
name="_apop_search_order_param[id][sort]"
|
||||
value="2">降順
|
||||
</label>
|
||||
<input type="hidden" class="list_order"
|
||||
name="_apop_search_order_param[post_sort][id]"
|
||||
value="">
|
||||
</li>
|
||||
<li class="product-list">
|
||||
<label>
|
||||
<input type="hidden" name="_apop_search_order_param[title][use]" value="0">
|
||||
<input type="checkbox" name="_apop_search_order_param[title][use]" value="1">
|
||||
<b>タイトル</b>
|
||||
</label>
|
||||
|
||||
<label><input class="apop_search_order_param" type="radio"
|
||||
name="_apop_search_order_param[title][sort]"
|
||||
value="1">昇順</label>
|
||||
|
||||
<label><input class="apop_search_order_param" type="radio"
|
||||
name="_apop_search_order_param[title][sort]"
|
||||
value="2">降順
|
||||
</label>
|
||||
<input type="hidden" class="list_order"
|
||||
name="_apop_search_order_param[post_sort][title]"
|
||||
value="">
|
||||
</li>
|
||||
<li class="product-list">
|
||||
<label>
|
||||
<input type="hidden" name="_apop_search_order_param[register][use]" value="0">
|
||||
<input type="checkbox" name="_apop_search_order_param[register][use]" value="1">
|
||||
<b>登録日</b>
|
||||
</label>
|
||||
|
||||
<label><input class="apop_search_order_param" type="radio"
|
||||
name="_apop_search_order_param[register][sort]"
|
||||
value="1">昇順</label>
|
||||
|
||||
<label><input class="apop_search_order_param" type="radio"
|
||||
name="_apop_search_order_param[register][sort]"
|
||||
value="2">降順</label>
|
||||
<input type="hidden" class="list_order"
|
||||
name="_apop_search_order_param[post_sort][register]"
|
||||
value="">
|
||||
</li>
|
||||
<li class="product-list">
|
||||
<label>
|
||||
<input type="hidden" name="_apop_search_order_param[modified][use]" value="0">
|
||||
<input type="checkbox" name="_apop_search_order_param[modified][use]" value="1">
|
||||
<b>更新日</b>
|
||||
</label>
|
||||
|
||||
<label><input class="apop_search_order_param" type="radio"
|
||||
name="_apop_search_order_param[modified][sort]"
|
||||
value="1">昇順</label>
|
||||
|
||||
<label><input class="apop_search_order_param" type="radio"
|
||||
name="_apop_search_order_param[modified][sort]"
|
||||
value="2">降順</label>
|
||||
<input type="hidden" class="list_order"
|
||||
name="_apop_search_order_param[post_sort][modified]"
|
||||
value="">
|
||||
</li>
|
||||
<?php echo $list; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="search_sort_box">
|
||||
<div class="normal_sort_box">
|
||||
<?php echo APOP_UI::none_registerd_alert_msg(); ?>
|
||||
<ul class="post-order-list">
|
||||
<?php foreach ( $search_lists as $i => $search_list ): $search_order = $i + 1; ?>
|
||||
<?php $exclude_posts[] = $search_list->ID; ?>
|
||||
<?php foreach ( $normal_lists as $i => $normal_list ): $normal_order = $i + 1; ?>
|
||||
<?php $exclude_posts[] = $normal_list->ID; ?>
|
||||
<li class="product-list">
|
||||
<span class="sort-num-label"><?php echo $search_order; ?></span>
|
||||
<?php echo $search_list->post_title; ?>
|
||||
<span class="sort-num-label"><?php echo $normal_order; ?></span>
|
||||
<?php echo $normal_list->post_title; ?>
|
||||
<input type="hidden" class="list_order"
|
||||
name="_apop_post_search[post_sort][<?php echo $search_list->ID; ?>]"
|
||||
value="<?php echo $search_order; ?>">
|
||||
name="_apop_post_normal[post_sort][<?php echo $normal_list->ID; ?>]"
|
||||
value="<?php echo $normal_order; ?>">
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php $search_none_lists = APOP_UI::get_all_search_posts( 'none', $exclude_posts ); ?>
|
||||
<?php $search_order = $search_order ?? 0; ?>
|
||||
<?php foreach ( $search_none_lists as $i => $search_list ): $search_order = $search_order + $i + 1; ?>
|
||||
<li class="product-list no_order">
|
||||
<span class="sort-num-label"><?php echo $search_order; ?></span>
|
||||
<?php $search_none_lists = APOP_UI::get_all_search_normal_posts( 'none', 'normal', $exclude_posts ); ?>
|
||||
<?php $normal_order = $normal_order ?? 0; ?>
|
||||
<?php foreach ( $search_none_lists as $i => $search_list ): $normal_order = $normal_order + $i + 1; ?>
|
||||
<li class="product-list no_order">■
|
||||
<span class="sort-num-label"><?php echo $normal_order; ?></span>
|
||||
<?php echo $search_list->post_title; ?>
|
||||
<input type="hidden" class="list_order"
|
||||
name="_apop_post_search[post_sort][<?php echo $search_list->ID; ?>]"
|
||||
value="<?php echo $search_order; ?>">
|
||||
name="_apop_post_normal[post_sort][<?php echo $search_list->ID; ?>]"
|
||||
value="<?php echo $normal_order; ?>">
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
@@ -145,33 +79,69 @@ $apop_search_order = get_option( '_apop_search_order' ) ?? '1';
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-order-box">
|
||||
<?php foreach ( $category_lists as $tax_key => $tax_list ) : ?>
|
||||
<div class="list-orders-outer">
|
||||
<?php if ( count( $tax_list ) > 0 ): $exclude_posts = []; ?>
|
||||
<?php foreach ( $tax_list as $tax_data ): ?>
|
||||
<div class="list-orders-inner">
|
||||
<form action="" method="post">
|
||||
<?php wp_nonce_field( 'sh_options' ); ?>
|
||||
<h3><?php echo $tax_data->name; ?></h3>
|
||||
<ul class="post-order-list">
|
||||
<?php
|
||||
list( $product_order_list, $exclude_posts, $sort_num ) = APOP_UI::create_order_list( $tax_data, $tax_key, $exclude_posts );
|
||||
echo $product_order_list;
|
||||
echo APOP_UI::create_product_none_order_list( $tax_data, $tax_key, $exclude_posts, $sort_num );
|
||||
?>
|
||||
</ul>
|
||||
<input type="hidden" name="submit_type" value="1">
|
||||
<p class="submit post-order"><input type="submit" name="Submit" class="button-primary"
|
||||
value="変更を保存"/></p>
|
||||
</form>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
<div class="list-orders-outer">
|
||||
<?php $exclude_posts = []; ?>
|
||||
<div class="list-orders-inner search_inner">
|
||||
<form action="" method="post">
|
||||
<?php wp_nonce_field( 'sh_options' ); ?>
|
||||
<ul class="apop_search_order_target"
|
||||
data-search_order_target="<?php echo $apop_search_order_check; ?>">
|
||||
<li><label>
|
||||
<input class="apop_search_order" type="radio" name="_apop_search_order"
|
||||
value="1"<?php checked( $apop_search_order_check, 1 ); ?>>標準</label></li>
|
||||
<li><label>
|
||||
<input class="apop_search_order" type="radio" name="_apop_search_order"
|
||||
value="2"<?php checked( $apop_search_order_check, 2 ); ?>>カスタム</label></li>
|
||||
</ul>
|
||||
<hr>
|
||||
<div class="search_sort_box">
|
||||
<?php list( $list, $alert ) = APOP_UI::create_search_normal_list( 'search' ); ?>
|
||||
<?php echo $alert; ?>
|
||||
<ul class="post-order-list search_normal_sort">
|
||||
<?php echo $list; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="search_sort_box">
|
||||
<?php echo APOP_UI::none_registerd_alert_msg(); ?>
|
||||
<ul class="post-order-list">
|
||||
<?php foreach ( $search_lists as $i => $search_list ): $search_order = $i + 1; ?>
|
||||
<?php $exclude_posts[] = $search_list->ID; ?>
|
||||
<li class="product-list">
|
||||
<span class="sort-num-label"><?php echo $search_order; ?></span>
|
||||
<?php echo $search_list->post_title; ?>
|
||||
<input type="hidden" class="list_order"
|
||||
name="_apop_post_search[post_sort][<?php echo $search_list->ID; ?>]"
|
||||
value="<?php echo $search_order; ?>">
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php $search_none_lists = APOP_UI::get_all_search_normal_posts( 'none', 'search', $exclude_posts ); ?>
|
||||
<?php $search_order = $search_order ?? 0; ?>
|
||||
<?php foreach ( $search_none_lists as $i => $search_list ): $search_order = $search_order + $i + 1; ?>
|
||||
<li class="product-list no_order">■
|
||||
<span class="sort-num-label"><?php echo $search_order; ?></span>
|
||||
<?php echo $search_list->post_title; ?>
|
||||
<input type="hidden" class="list_order"
|
||||
name="_apop_post_search[post_sort][<?php echo $search_list->ID; ?>]"
|
||||
value="<?php echo $search_order; ?>">
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="submit_type" value="1">
|
||||
<p class="submit post-order"><input type="submit" name="Submit" class="button-primary"
|
||||
value="変更を保存"/></p>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-order-box">
|
||||
<?php foreach ( $tag_lists as $tax_key => $tax_list ) : ?>
|
||||
<?php if ( count( $taxonomy_lists['taxonomy'] ) > 0 ): ?>
|
||||
<?php echo APOP_UI::none_registerd_alert_msg(); ?>
|
||||
<?php endif; ?>
|
||||
<?php foreach ( $category_lists as $tax_key => $tax_list ) : ?>
|
||||
<div class="list-orders-outer">
|
||||
<?php if ( count( $tax_list ) > 0 ): $exclude_posts = []; ?>
|
||||
<?php foreach ( $tax_list as $tax_data ): ?>
|
||||
@@ -192,11 +162,47 @@ $apop_search_order = get_option( '_apop_search_order' ) ?? '1';
|
||||
</form>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<?php echo APOP_UI::create_none_select_msg( 'カテゴリー' ); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<div class="post-order-box">
|
||||
<?php if ( count( $taxonomy_lists['taxonomy'] ) > 0 ): ?>
|
||||
<?php echo APOP_UI::none_registerd_alert_msg(); ?>
|
||||
<?php endif; ?>
|
||||
<?php foreach ( $tag_lists as $tax_key => $tax_list ) : ?>
|
||||
<div class="list-orders-outer">
|
||||
<?php if ( count( $tax_list ) > 0 ): $exclude_posts = []; ?>
|
||||
<?php foreach ( $tax_list as $tax_data ): ?>
|
||||
<div class="list-orders-inner">
|
||||
<form action="" method="post">
|
||||
<?php wp_nonce_field( 'sh_options' ); ?>
|
||||
<h3><?php echo $tax_data->name; ?></h3>
|
||||
<ul class="post-order-list">
|
||||
<?php
|
||||
list( $product_order_list, $exclude_posts, $sort_num ) = APOP_UI::create_order_list( $tax_data, $tax_key, $exclude_posts );
|
||||
echo $product_order_list;
|
||||
echo APOP_UI::create_product_none_order_list( $tax_data, $tax_key, $exclude_posts, $sort_num );
|
||||
?>
|
||||
</ul>
|
||||
<input type="hidden" name="submit_type" value="3">
|
||||
<p class="submit post-order"><input type="submit" name="Submit" class="button-primary"
|
||||
value="変更を保存"/></p>
|
||||
</form>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<?php echo APOP_UI::create_none_select_msg( 'タグ' ); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<div class="post-order-box">
|
||||
<?php if ( count( $taxonomy_lists['taxonomy'] ) > 0 ): ?>
|
||||
<?php echo APOP_UI::none_registerd_alert_msg(); ?>
|
||||
<?php endif; ?>
|
||||
<?php foreach ( $taxonomy_lists as $tax_key => $taxonomy_list ): ?>
|
||||
<div class="list-orders-outer">
|
||||
<?php foreach ( $taxonomy_list as $tax_list ) : ?>
|
||||
@@ -213,7 +219,7 @@ $apop_search_order = get_option( '_apop_search_order' ) ?? '1';
|
||||
echo APOP_UI::create_product_none_order_list( $tax_data, $tax_key, $exclude_posts, $sort_num );
|
||||
?>
|
||||
</ul>
|
||||
<input type="hidden" name="submit_type" value="3">
|
||||
<input type="hidden" name="submit_type" value="4">
|
||||
<p class="submit post-order"><input type="submit" name="Submit"
|
||||
class="button-primary"
|
||||
value="変更を保存"/></p>
|
||||
@@ -222,6 +228,9 @@ $apop_search_order = get_option( '_apop_search_order' ) ?? '1';
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php if ( count( $taxonomy_lists['taxonomy'] ) == 0 ): ?>
|
||||
<?php echo APOP_UI::create_none_select_msg( 'カスタム分類' ); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
+114
-89
@@ -16,66 +16,48 @@ $all_tax = APOP_UI::get_all_taxonomies( 'taxonomy' );
|
||||
<h2>設定</h2>
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th scope="row">検索</th>
|
||||
<th scope="row">全体設定</th>
|
||||
<td>
|
||||
<dl class="post_per_page_list">
|
||||
<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 echo checked( $per_page_data['_per_page'], 'default' ); ?>>表示設定に従う</label>
|
||||
value="default"<?php checked( $per_page_data['_per_page'], 'default' ); ?>>表示設定に従う</label>
|
||||
</li>
|
||||
<li><label>
|
||||
<input class="per_page_search" type="radio" name="_apop_per_page[search]"
|
||||
value="-1"<?php echo checked( $per_page_data['_per_page'], '-1' ); ?>>全件</label>
|
||||
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="set"<?php echo $per_page_data['_set']; ?>>表示数設定
|
||||
value=""<?php echo $per_page_data['_checked']; ?>>表示数設定
|
||||
<input class="per_page_search_input" type="text"
|
||||
name="_apop_per_page[search]"
|
||||
value="<?php echo $per_page_data['_per_page_num']; ?>" required>
|
||||
</label></li>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ( count( $all_categories ) > 0 ): ?>
|
||||
<?php if ( count( $all_categories ) > 0 ): $disp = false; ?>
|
||||
<tr>
|
||||
<th scope="row">カテゴリー</th>
|
||||
<th scope="row">カテゴリー設定</th>
|
||||
<td>
|
||||
<dl class="post_per_page_list">
|
||||
<dt>1ページ表示件数</dt>
|
||||
<dd><?php $per_page_data = APOP_UI::create_cat_per_page( $opt_per_page, 'category' ); ?>
|
||||
<ul>
|
||||
<li>
|
||||
<label>
|
||||
<input class="per_page_cat" type="radio" name="_apop_per_page[category]"
|
||||
value="default"<?php echo checked( $per_page_data['_per_page'], 'default' ); ?>>表示設定に従う</label>
|
||||
</li>
|
||||
<li><label>
|
||||
<input class="per_page_cat" type="radio" name="_apop_per_page[category]"
|
||||
value="-1"<?php echo checked( $per_page_data['_per_page'], '-1' ); ?>>全件</label>
|
||||
</li>
|
||||
<li>
|
||||
<label><input class="per_page_cat" type="radio"
|
||||
name="_apop_per_page[category]"
|
||||
value="set"<?php echo $per_page_data['_set']; ?>>表示数設定
|
||||
<input class="per_page_cat_input" type="text"
|
||||
name="_apop_per_page[category]"
|
||||
value="<?php echo $per_page_data['_per_page_num']; ?>" required>
|
||||
</label></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt>対象カテゴリー</dt>
|
||||
<dl class="apop_setting_list">
|
||||
<dt>対象</dt>
|
||||
<dd>
|
||||
<ul class="order_setting_list">
|
||||
<?php foreach ( $all_categories as $category ): ?>
|
||||
<?php $check_slug = $opt_cat['target_cat'][ $category->term_id ] ?? ''; ?>
|
||||
<?php
|
||||
$check_slug = $opt_cat['target_cat'][ $category->term_id ] ?? '';
|
||||
APOP_UI::is_disp_per_page( $disp, $check_slug );
|
||||
?>
|
||||
<li>
|
||||
<div class="select_cat">
|
||||
<label>
|
||||
@@ -84,7 +66,7 @@ $all_tax = APOP_UI::get_all_taxonomies( 'taxonomy' );
|
||||
value="0">
|
||||
<input type="checkbox"
|
||||
name="_apop_cat_order[target_cat][<?php echo $category->term_id; ?>]"
|
||||
<?php echo checked( $check_slug, 1 ); ?>
|
||||
<?php checked( $check_slug, 1 ); ?>
|
||||
value="1">
|
||||
<?php echo $category->name; ?>
|
||||
</label>
|
||||
@@ -93,41 +75,51 @@ $all_tax = APOP_UI::get_all_taxonomies( 'taxonomy' );
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt<?php echo APOP_UI::create_disp_class( $disp ); ?>>1ページ表示件数</dt>
|
||||
<dd<?php echo APOP_UI::create_disp_class( $disp ); ?>>
|
||||
<?php $per_page_data = APOP_UI::create_cat_per_page( $opt_per_page, 'category' ); ?>
|
||||
<ul>
|
||||
<li>
|
||||
<label>
|
||||
<input class="per_page_cat" type="radio" name="_apop_per_page[category]"
|
||||
value="default"<?php checked( $per_page_data['_per_page'], 'default' ); ?>>表示設定に従う</label>
|
||||
</li>
|
||||
<li><label>
|
||||
<input class="per_page_cat" type="radio" name="_apop_per_page[category]"
|
||||
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[category]"
|
||||
value="-1"<?php checked( $per_page_data['_per_page'], '-1' ); ?>>全件</label>
|
||||
</li>
|
||||
<li>
|
||||
<label><input class="per_page_cat" type="radio"
|
||||
name="_apop_per_page[category]"
|
||||
value=""<?php echo $per_page_data['_checked']; ?>>表示数設定
|
||||
<input class="per_page_cat_input" type="text"
|
||||
name="_apop_per_page[category]"
|
||||
value="<?php echo $per_page_data['_per_page_num']; ?>" required>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php if ( count( $all_tags ) > 0 ): ?>
|
||||
<?php if ( count( $all_tags ) > 0 ): $disp = false; ?>
|
||||
<tr>
|
||||
<th scope="row">タグ</th>
|
||||
<th scope="row">タグ設定</th>
|
||||
<td>
|
||||
<dl class="post_per_page_list">
|
||||
<dt>1ページ表示件数</dt>
|
||||
<dd><?php $per_page_data = APOP_UI::create_cat_per_page( $opt_per_page, 'tag' ); ?>
|
||||
<ul>
|
||||
<li>
|
||||
<label>
|
||||
<input class="per_page_tag" type="radio" name="_apop_per_page[tag]"
|
||||
value="default"<?php echo checked( $per_page_data['_per_page'], 'default' ); ?>>表示設定に従う</label>
|
||||
</li>
|
||||
<li><label>
|
||||
<input class="per_page_tag" type="radio" name="_apop_per_page[tag]"
|
||||
value="-1"<?php echo checked( $per_page_data['_per_page'], '-1' ); ?>>全件</label>
|
||||
</li>
|
||||
<li>
|
||||
<label><input class="per_page_tag" type="radio" name="_apop_per_page[tag]"
|
||||
value="set"<?php echo $per_page_data['_set']; ?>>表示数設定
|
||||
<input class="per_page_tag_input" type="text"
|
||||
name="_apop_per_page[tag]"
|
||||
value="<?php echo $per_page_data['_per_page_num']; ?>" required>
|
||||
</label></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt>対象タグ</dt>
|
||||
<dl class="apop_setting_list">
|
||||
<dt>対象</dt>
|
||||
<dd>
|
||||
<ul class="order_setting_list">
|
||||
<?php foreach ( $all_tags as $tag ): ?>
|
||||
<?php $check_slug = $opt_tag['target_cat'][ $tag->term_id ] ?? ''; ?>
|
||||
<?php
|
||||
$check_slug = $opt_tag['target_cat'][ $tag->term_id ] ?? '';
|
||||
APOP_UI::is_disp_per_page( $disp, $check_slug );
|
||||
?>
|
||||
<li>
|
||||
<div class="select_cat">
|
||||
<label>
|
||||
@@ -136,7 +128,7 @@ $all_tax = APOP_UI::get_all_taxonomies( 'taxonomy' );
|
||||
value="0">
|
||||
<input type="checkbox"
|
||||
name="_apop_tag_order[target_cat][<?php echo $tag->term_id; ?>]"
|
||||
<?php echo checked( $check_slug, 1 ); ?>
|
||||
<?php checked( $check_slug, 1 ); ?>
|
||||
value="1">
|
||||
<?php echo $tag->name; ?>
|
||||
</label>
|
||||
@@ -145,44 +137,51 @@ $all_tax = APOP_UI::get_all_taxonomies( 'taxonomy' );
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt<?php echo APOP_UI::create_disp_class( $disp ); ?>>1ページ表示件数</dt>
|
||||
<dd<?php echo APOP_UI::create_disp_class( $disp ); ?>><?php $per_page_data = APOP_UI::create_cat_per_page( $opt_per_page, 'tag' ); ?>
|
||||
<ul>
|
||||
<li>
|
||||
<label>
|
||||
<input class="per_page_tag" type="radio" name="_apop_per_page[tag]"
|
||||
value="default"<?php checked( $per_page_data['_per_page'], 'default' ); ?>>表示設定に従う</label>
|
||||
</li>
|
||||
<li><label>
|
||||
<input class="per_page_tag" type="radio" name="_apop_per_page[tag]"
|
||||
value="all"<?php checked( $per_page_data['_per_page'], 'all' ); ?>>全体設定に従う</label>
|
||||
</li>
|
||||
<li><label>
|
||||
<input class="per_page_tag" type="radio" name="_apop_per_page[tag]"
|
||||
value="-1"<?php checked( $per_page_data['_per_page'], '-1' ); ?>>全件</label>
|
||||
</li>
|
||||
<li>
|
||||
<label><input class="per_page_tag" type="radio" name="_apop_per_page[tag]"
|
||||
value=""<?php echo $per_page_data['_checked']; ?>>表示数設定
|
||||
<input class="per_page_tag_input" type="text"
|
||||
name="_apop_per_page[tag]"
|
||||
value="<?php echo $per_page_data['_per_page_num']; ?>" required>
|
||||
</label></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php if ( count( $all_tax ) > 0 ): ?>
|
||||
<?php
|
||||
if ( count( $all_tax ) > 0 ): $disp = false; ?>
|
||||
<tr>
|
||||
<th scope="row">カスタム分類</th>
|
||||
<td>
|
||||
<dl class="post_per_page_list">
|
||||
<dt>1ページ表示件数</dt>
|
||||
<dd>
|
||||
<?php $per_page_data = APOP_UI::create_cat_per_page( $opt_per_page, 'tax' ); ?>
|
||||
<ul>
|
||||
<li>
|
||||
<label>
|
||||
<input class="per_page_tax" type="radio" name="_apop_per_page[tax]"
|
||||
value="default"<?php echo checked( $per_page_data['_per_page'], 'default' ); ?>>表示設定に従う</label>
|
||||
</li>
|
||||
<li><label>
|
||||
<input class="per_page_tax" type="radio" name="_apop_per_page[tax]"
|
||||
value="-1"<?php echo checked( $per_page_data['_per_page'], '-1' ); ?>>全件</label>
|
||||
</li>
|
||||
<li>
|
||||
<label><input class="per_page_tax" type="radio" name="_apop_per_page[tax]"
|
||||
value="set"<?php echo $per_page_data['_set']; ?>>表示数設定
|
||||
<input class="per_page_tax_input" type="text"
|
||||
name="_apop_per_page[tax]"
|
||||
value="<?php echo $per_page_data['_per_page_num']; ?>" required>
|
||||
</label></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt>対象タクソノミー</dt>
|
||||
<dl class="apop_setting_list">
|
||||
<dt>対象</dt>
|
||||
<dd>
|
||||
<ul class="order_setting_list">
|
||||
<?php foreach ( $all_tax as $tax ): $all_taxs = APOP_UI::get_all_taxonomies( $tax ) ?>
|
||||
<?php foreach ( $all_tax as $tax ): $all_taxs = APOP_UI::get_all_taxonomies( $tax ); ?>
|
||||
<?php foreach ( $all_taxs as $tax ): ?>
|
||||
<?php $check_slug = $opt_tax['target_cat'][ $tax->term_id ] ?? ''; ?>
|
||||
<?php
|
||||
$check_slug = $opt_tax['target_cat'][ $tax->term_id ] ?? '';
|
||||
APOP_UI::is_disp_per_page( $disp, $check_slug );
|
||||
?>
|
||||
<li>
|
||||
<div class="select_cat">
|
||||
<label>
|
||||
@@ -191,7 +190,7 @@ $all_tax = APOP_UI::get_all_taxonomies( 'taxonomy' );
|
||||
value="0">
|
||||
<input type="checkbox"
|
||||
name="_apop_tax_order[target_cat][<?php echo $tax->term_id; ?>]"
|
||||
<?php echo checked( $check_slug, 1 ); ?>
|
||||
<?php checked( $check_slug, 1 ); ?>
|
||||
value="1">
|
||||
<?php echo $tax->name; ?>
|
||||
</label>
|
||||
@@ -201,6 +200,32 @@ $all_tax = APOP_UI::get_all_taxonomies( 'taxonomy' );
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt<?php echo APOP_UI::create_disp_class( $disp ); ?>>1ページ表示件数</dt>
|
||||
<dd<?php echo APOP_UI::create_disp_class( $disp ); ?>>
|
||||
<?php $per_page_data = APOP_UI::create_cat_per_page( $opt_per_page, 'tax' ); ?>
|
||||
<ul>
|
||||
<li>
|
||||
<label>
|
||||
<input class="per_page_tax" type="radio" name="_apop_per_page[tax]"
|
||||
value="default"<?php checked( $per_page_data['_per_page'], 'default' ); ?>>表示設定に従う</label>
|
||||
</li>
|
||||
<li><label>
|
||||
<input class="per_page_tax" type="radio" name="_apop_per_page[tax]"
|
||||
value="all"<?php checked( $per_page_data['_per_page'], 'all' ); ?>>全体設定に従う</label>
|
||||
</li>
|
||||
<li><label>
|
||||
<input class="per_page_tax" type="radio" name="_apop_per_page[tax]"
|
||||
value="-1"<?php checked( $per_page_data['_per_page'], '-1' ); ?>>全件</label>
|
||||
</li>
|
||||
<li>
|
||||
<label><input class="per_page_tax" type="radio" name="_apop_per_page[tax]"
|
||||
value=""<?php echo $per_page_data['_checked']; ?>>表示数設定
|
||||
<input class="per_page_tax_input" type="text"
|
||||
name="_apop_per_page[tax]"
|
||||
value="<?php echo $per_page_data['_per_page_num']; ?>" required>
|
||||
</label></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user