e3c8fc967c
・投稿のソート用カスタムフィールドのキーについて、他システム等の競合を避け且つアンインストール時に前方一致で削除可能となるよう接頭辞を追加(接頭辞はプログラム側で持つため、管理画面上は表示しない) ・プラグイン削除時、オプションやカスタムフィールドを全削除するよう修正 ・標準+カスタムフィールドソートの横並びを修正
59 lines
2.8 KiB
PHP
59 lines
2.8 KiB
PHP
<?php if ( isset( $tax_lists, $tax_title_text ) ): ?>
|
|
<?php foreach ( $tax_lists as $tax_key => $tax_list ) : ?>
|
|
<div class="list-orders-outer">
|
|
<?php if ( count( $tax_list ) > 0 ): ?>
|
|
<?php echo APOP_UI::none_registered_alert_msg(); ?>
|
|
<?php foreach ( $tax_list as $tax_data ): ?>
|
|
<div class="list-orders-inner">
|
|
<h3><?php echo $tax_data->name; ?></h3>
|
|
<?php
|
|
$order_target_data = get_option( '_apop_tax_sort_type' );
|
|
if ( isset( $order_target_data[ $tax_data->term_id ] ) ) {
|
|
$order_target = $order_target_data[ $tax_data->term_id ];
|
|
} else {
|
|
$order_target = 1;
|
|
}
|
|
?>
|
|
<ul class="sort_menu_list"
|
|
data-order_target="<?php echo $order_target; ?>">
|
|
<li>
|
|
<label>
|
|
<input class="sort_menu" type="radio"
|
|
name="_apop_tax_sort_type[<?php echo $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 $tax_data->term_id; ?>]"
|
|
value="2"<?php checked( $order_target, 2 ); ?>>標準+カスタムフィールドソート</label>
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="sort_box">
|
|
<ul class="post-order-list">
|
|
<?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 ); ?>
|
|
<?php echo $alert; ?>
|
|
<div class="enable_box">
|
|
<h4>有効</h4>
|
|
<ul class="post-order-list search_normal_sort">
|
|
<?php echo $list; ?>
|
|
</ul>
|
|
</div>
|
|
<div class="disable_box">
|
|
<h4>無効</h4>
|
|
<ul class="disable_normal_list"></ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endforeach; ?>
|
|
<?php else: ?>
|
|
<?php echo APOP_UI::create_none_select_msg( $tax_title_text ); ?>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php endforeach; ?>
|
|
<?php endif;
|