WP PLUGIN 投稿表示順設定

・タクソノミーのソート順登録/未登録両方取得するようget_postsのパラメータを修正
・タクソノミーのソート順登録/未登録両方取得に伴いテンプレートを修正
・通常と検索のソート順登録/未登録両方取得するようget_postsのパラメータを修正
・「表示設定に従う」メニューへposts_per_pageの設定件数を表示
・バグ修正:検索設定のnema属性修正と検索ページのメソッド引数修正
This commit is contained in:
2021-05-08 11:50:31 +09:00
parent bacd6a1d72
commit df9c7deef1
7 changed files with 334 additions and 326 deletions
+14 -9
View File
@@ -8,10 +8,11 @@ $all_tax = APOP_UI::get_all_taxonomies( 'taxonomy' );
<form action="" method="post">
<?php
wp_nonce_field( 'sh_options' );
$opt_cat = get_option( '_apop_cat_order' );
$opt_per_page = get_option( '_apop_per_page' );
$opt_tag = get_option( '_apop_tag_order' );
$opt_tax = get_option( '_apop_tax_order' );
$opt_cat = get_option( '_apop_cat_order' );
$opt_per_page = get_option( '_apop_per_page' );
$opt_tag = get_option( '_apop_tag_order' );
$opt_tax = get_option( '_apop_tax_order' );
$default_per_page = get_option( 'posts_per_page' );
?>
<h2>設定</h2>
<table class="form-table">
@@ -25,7 +26,8 @@ $all_tax = APOP_UI::get_all_taxonomies( 'taxonomy' );
<li>
<label>
<input class="per_page_search" type="radio" name="_apop_per_page[search]"
value="default"<?php checked( $per_page_data['_per_page'], 'default' ); ?>>表示設定に従う</label>
value="default"<?php checked( $per_page_data['_per_page'], 'default' ); ?>>表示設定に従う<?php echo $default_per_page; ?>
件)</label>
</li>
<li><label>
<input class="per_page_search" type="radio" name="_apop_per_page[search]"
@@ -45,7 +47,7 @@ $all_tax = APOP_UI::get_all_taxonomies( 'taxonomy' );
</dl>
</td>
</tr>
<?php if ( count( $all_categories ) > 0 ): $disp = false; ?>
<?php if ( count( $all_categories ) > 0 ): $disp = false; ?>
<tr>
<th scope="row">カテゴリー設定</th>
<td>
@@ -82,7 +84,8 @@ $all_tax = APOP_UI::get_all_taxonomies( 'taxonomy' );
<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>
value="default"<?php checked( $per_page_data['_per_page'], 'default' ); ?>>表示設定に従う<?php echo $default_per_page; ?>
件)</label>
</li>
<li><label>
<input class="per_page_cat" type="radio" name="_apop_per_page[category]"
@@ -143,7 +146,8 @@ $all_tax = APOP_UI::get_all_taxonomies( 'taxonomy' );
<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>
value="default"<?php checked( $per_page_data['_per_page'], 'default' ); ?>>表示設定に従う<?php echo $default_per_page; ?>
件)</label>
</li>
<li><label>
<input class="per_page_tag" type="radio" name="_apop_per_page[tag]"
@@ -207,7 +211,8 @@ $all_tax = APOP_UI::get_all_taxonomies( 'taxonomy' );
<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>
value="default"<?php checked( $per_page_data['_per_page'], 'default' ); ?>>表示設定に従う<?php echo $default_per_page; ?>
件)</label>
</li>
<li><label>
<input class="per_page_tax" type="radio" name="_apop_per_page[tax]"