WP PLUGIN 

・カスタムフィールドの必須チェック漏れの修正
・既存カスタムフィールド選択も可能なよう修正
・ソートのリストに背景色を設定
・並べ替え設定ページの更新ボタン位置を修正
・カテゴリー、タグ、カスタム分類のソート対象選択のラジオボタン並び順を標準、検索と同一になるよう修正
This commit is contained in:
2021-06-25 20:58:52 +09:00
parent c7996062fa
commit f6d64404a7
12 changed files with 202 additions and 57 deletions
+5 -5
View File
@@ -12,8 +12,8 @@ $submit_type = APOP_UI::input_post_filter( 'apop_submit_type', 'str' );
<li>カスタム分類</li>
</ul>
</nav>
<div class="post-order-box-outer">
<form action="" method="post">
<form action="" method="post">
<div class="post-order-box-outer">
<?php wp_nonce_field( 'sh_options' ); ?>
<input id="apop_submit_type" type="hidden" name="apop_submit_type"
value="<?php echo esc_attr( $submit_type ); ?>">
@@ -106,7 +106,7 @@ $submit_type = APOP_UI::input_post_filter( 'apop_submit_type', 'str' );
<?php include APOP_PLUGIN_PATH . 'template/order_parts_taxonomy.php'; ?>
</div>
</div>
<p class="apop-submit"><input type="submit" name="submit" class="button-primary" value="変更を保存"/></p>
</form>
</div>
</div>
<p class="apop-submit"><input type="submit" name="submit" class="button-primary" value="変更を保存"/></p>
</form>
</div>
+4 -3
View File
@@ -10,7 +10,7 @@
if ( isset( $order_target_data[ $tax_data->term_id ] ) ) {
$order_target = $order_target_data[ $tax_data->term_id ];
} else {
$order_target = 1;
$order_target = 2;
}
?>
<ul class="sort-menu-list"
@@ -19,13 +19,13 @@
<label>
<input class="sort_menu" type="radio"
name="_apop_tax_sort_type[<?php echo esc_attr( $tax_data->term_id ); ?>]"
value="1"<?php checked( $order_target, 1 ); ?>>ドラッグソート</label>
value="2"<?php checked( $order_target, 2 ); ?>>標準+カスタムフィールドソート</label>
</li>
<li>
<label>
<input class="sort_menu" type="radio"
name="_apop_tax_sort_type[<?php echo esc_attr( $tax_data->term_id ); ?>]"
value="2"<?php checked( $order_target, 2 ); ?>>標準+カスタムフィールドソート</label>
value="1"<?php checked( $order_target, 1 ); ?>>ドラッグソート</label>
</li>
</ul>
@@ -36,6 +36,7 @@
<?php echo APOP_UI::create_order_list( $tax_data, $tax_key ); ?>
</ul>
</div>
<div class="sort_box">
<hr>
<p>並べ替えを登録するには「変更を保存」をクリックしてください</p>
+17 -6
View File
@@ -5,13 +5,24 @@
<dt><?php echo esc_html( $this->labels[ $type ] ); ?></dt>
<dd>
<ul>
<?php foreach ( $items as $item ): ?>
<?php foreach ( $items as $idx => $item ): ?>
<?php if ( ! empty( $item ) ): ?>
<li><label><?php echo esc_html( $item ); ?></label>
<input type="text"
name="<?php echo esc_attr( APOP_CUSTOM_FIELD_PREFIX . $item ); ?>"
value="<?php echo esc_attr( $this->get_custom_field_data( $item ) ); ?>"/>
</li>
<?php
if ( $this->custom_field_type[ $type ][ $idx ] == '2' ) {
$custom_field_prefix = APOP_CUSTOM_FIELD_PREFIX;
} else {
$custom_field_prefix = '';
}
?>
<?php if ( ! empty( $custom_field_prefix ) ): ?>
<li><label><?php echo esc_html( $item ); ?></label>
<input type="text"
name="<?php echo esc_attr( $custom_field_prefix . $item ); ?>"
value="<?php echo esc_attr( $this->get_custom_field_data( $item, $custom_field_prefix ) ); ?>"/>
</li>
<?php else: ?>
<?php echo esc_html( $item ); ?> ]はカスタムフィールドから設定してください
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
</ul>