ARCHIVE POST ORDER PLUS

翻訳対応
検索のカスタムフィールド選択バグ修正
This commit is contained in:
2021-07-11 17:40:23 +09:00
parent ae93196007
commit b8dcf1c44c
16 changed files with 388 additions and 105 deletions
+16 -16
View File
@@ -249,7 +249,7 @@ value="' . esc_html( $sort_num ) . '">
if ( count( $tax_data ) > 0 ) {
$order_name = $order_name;
$order_tax = $key == 'post_tag' ? 'tag' : $key;
echo '<tr><th scope="row">' . esc_html( $title ) . '設定</th><td>';
echo '<tr><th scope="row">' . esc_html( $title ) . '</th><td>';
include APOP_PLUGIN_PATH . 'template/setting_parts_taxonomy.php';
echo '</td></tr>';
}
@@ -289,14 +289,14 @@ value="' . esc_html( $sort_num ) . '">
}
$target_keys = self::set_search_normal_target_keys( $order_param );
$target_values = array(
'date' => '登録日',
'title' => 'タイトル',
'date' => __( 'Published', APOP_DOMAIN ),
'title' => __( 'Post Title', APOP_DOMAIN ),
'ID' => 'ID',
'modified' => '更新日',
'custom_field' => 'カスタムフィールド1',
'custom_field_2' => 'カスタムフィールド2',
'custom_field_3' => 'カスタムフィールド3',
'custom_field_4' => 'カスタムフィールド4',
'modified' => __( 'Modified', APOP_DOMAIN ),
'custom_field' => __( 'Custom filed 1', APOP_DOMAIN ),
'custom_field_2' => __( 'Custom filed 2', APOP_DOMAIN ),
'custom_field_3' => __( 'Custom filed 3', APOP_DOMAIN ),
'custom_field_4' => __( 'Custom filed 4', APOP_DOMAIN ),
);
$list = array();
foreach ( $target_keys as $target_key ) {
@@ -318,17 +318,17 @@ value="' . esc_html( $sort_num ) . '">
<label>
<input type="hidden" name="' . esc_attr( $name_use_key ) . '"
value="0"' . esc_attr( self::set_search_normal_checked( $use, 0 ) ) . '>
<span class="en_dis_label">有効</span><input class="' . esc_html( $target_key_check_class ) . '"
<span class="en_dis_label">' . __( 'Enabled', APOP_DOMAIN ) . '</span><input class="' . esc_html( $target_key_check_class ) . '"
type="checkbox" name="' . esc_attr( $name_use_key ) . '" value="1"' . esc_attr( self::set_search_normal_checked( $use, 1 ) ) . '>
</label>
<label>
<input class="order_param" type="radio"
name="' . esc_attr( $name_sort_key ) . '"
value="1"' . esc_attr( self::set_search_normal_checked( $sort, 1 ) ) . '>昇順</label>
value="1"' . esc_attr( self::set_search_normal_checked( $sort, 1 ) ) . '>' . __( 'Asc', APOP_DOMAIN ) . '</label>
<label>
<input class="order_param" type="radio"
name="' . esc_attr( $name_sort_key ) . '"
value="2"' . esc_attr( self::set_search_normal_checked( $sort, 2 ) ) . '>降順</label>';
value="2"' . esc_attr( self::set_search_normal_checked( $sort, 2 ) ) . '>' . __( 'Desc', APOP_DOMAIN ) . '</label>';
if ( strpos( $target_key, 'custom_field' ) !== false ) {
self::create_custom_field_sort_type( $name_key, $target_key, $cnv_order_params );
@@ -355,28 +355,28 @@ value="' . esc_html( $sort_num ) . '">
<input type="radio"
class="custom-field-type"
name="' . esc_attr( $name_custom_field_type ) . '"
value="1"' . esc_attr( self::set_search_normal_checked( $custom_field_type, '1' ) ) . '>選択</label>
value="1"' . esc_attr( self::set_search_normal_checked( $custom_field_type, '1' ) ) . '>' . __( 'Select', APOP_DOMAIN ) . '</label>
<label>
<input type="radio"
class="custom-field-type"
name="' . esc_attr( $name_custom_field_type ) . '"
value="2"' . esc_attr( self::set_search_normal_checked( $custom_field_type, '2' ) ) . '>追加</label>
value="2"' . esc_attr( self::set_search_normal_checked( $custom_field_type, '2' ) ) . '>' . __( 'Add', APOP_DOMAIN ) . '</label>
</div>';
echo '<input type="text" class="select-custom-field-input custom_field_key_select" name="' . esc_attr( $name_meta_key ) . '" . value="' . esc_attr( $custom_field_val_1 ) . '" required>
<input type="text" class="custom_field_key" name="' . esc_attr( $name_meta_key ) . '" value="' . esc_attr( $custom_field_val_2 ) . '" required>
</div>
<div class="custom-field-select-alert"></div>
<div class="sort-custom-field-inner">
<div class="sort-custom-field-inner-label">値タイプ</div>
<div class="sort-custom-field-inner-label">' . __( 'Type', APOP_DOMAIN ) . '</div>
<label class="sort-custom-field-text-label">
<input type="radio"
class="custom-field-meta-value"
name="' . esc_attr( $name_value_type ) . '"
value="meta_value"' . esc_attr( self::set_search_normal_checked( $value_type, 'meta_value' ) ) . '>テキスト</label>
value="meta_value"' . esc_attr( self::set_search_normal_checked( $value_type, 'meta_value' ) ) . '>' . __( 'Text', APOP_DOMAIN ) . '</label>
<label><input type="radio"
class="custom-field-meta-value"
name="' . esc_attr( $name_value_type ) . '"
value="meta_value_num"' . esc_attr( self::set_search_normal_checked( $value_type, 'meta_value_num' ) ) . '>数値</label>
value="meta_value_num"' . esc_attr( self::set_search_normal_checked( $value_type, 'meta_value_num' ) ) . '>' . __( 'Number', APOP_DOMAIN ) . '</label>
</div>
</div>';
}