05b5fa91aa
・不要な初期化を削除 ・カスタムタクソノミー対応 ・設定画面のタブ化 ・設定画面各タクソノミーの投稿リスト表示をメソッド化 ・name属性の閉じ忘れ修正 ・不要なreturn削除 ・APOP_UI::create_product_none_order_list() returnに変数が未設定の場合の条件を追加 ・readmeに若干加筆
94 lines
4.4 KiB
PHP
94 lines
4.4 KiB
PHP
<?php
|
|
$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' ) );
|
|
?>
|
|
<nav class="post-order-nav">
|
|
<ul>
|
|
<li class="en">カテゴリー</li>
|
|
<li>タグ</li>
|
|
<li>カスタム分類</li>
|
|
</ul>
|
|
</nav>
|
|
<div class="post-order-box-outer">
|
|
<div class="post-order-box">
|
|
<h2>カテゴリー</h2>
|
|
<?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>
|
|
<p class="submit post-order"><input type="submit" name="Submit" class="button-primary"
|
|
value="変更を保存"/></p>
|
|
</form>
|
|
</div>
|
|
<?php endforeach; ?>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
<div class="post-order-box">
|
|
<h2>タグ</h2>
|
|
<?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>
|
|
<p class="submit post-order"><input type="submit" name="Submit" class="button-primary"
|
|
value="変更を保存"/></p>
|
|
</form>
|
|
</div>
|
|
<?php endforeach; ?>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
<div class="post-order-box">
|
|
<h2>カスタム分類</h2>
|
|
<?php foreach ( $taxonomy_lists as $tax_key => $taxonomy_list ): ?>
|
|
<div class="list-orders-outer">
|
|
<?php foreach ( $taxonomy_list as $tax_list ) : ?>
|
|
<?php if ( count( $taxonomy_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>
|
|
<p class="submit post-order"><input type="submit" name="Submit" class="button-primary"
|
|
value="変更を保存"/></p>
|
|
</form>
|
|
</div>
|
|
<?php endforeach; ?>
|
|
<?php endif; ?>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
</div>
|