WP PLUGIN CSSセレクタの修正
・アンダーバーからハイフンに変更
This commit is contained in:
@@ -22,25 +22,16 @@ if ( ! class_exists( 'APOP_UI' ) ) {
|
||||
$list = array();
|
||||
foreach ( $posts_data as $i => $post_data ) {
|
||||
$order = $i + 1;
|
||||
$no_order = self::is_sort_post_registered( $post_data->ID, $meta_key ) ? '' : ' no_order';
|
||||
$no_order = self::is_sort_post_registered( $post_data->ID, $meta_key ) ? '' : ' no-order';
|
||||
echo '<li class="product-list' . esc_attr( $no_order ) . '">'
|
||||
. esc_attr( self::crate_non_registerd_mark( $no_order ) )
|
||||
. '<span class="sort-num-label">' . esc_html( $order ) . '</span>' . esc_html( $post_data->post_title )
|
||||
. '<input type="hidden" class="list_order"
|
||||
. '<input type="hidden" class="list-order"
|
||||
name="_apop_post_' . esc_attr( $key ) . '[post_sort][' . esc_attr( $post_data->ID ) . ']"
|
||||
value="' . esc_attr( $order ) . '">
|
||||
</li>';
|
||||
}
|
||||
}
|
||||
|
||||
private static function crate_non_registerd_mark( $no_order ): string {
|
||||
if ( ! empty( $no_order ) ) {
|
||||
return '■';
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
private static function create_search_normal_args( $meta_key ): array {
|
||||
return array(
|
||||
'post_status' => array( 'publish', 'draft' ),
|
||||
@@ -139,11 +130,10 @@ if ( ! class_exists( 'APOP_UI' ) ) {
|
||||
$list = array();
|
||||
foreach ( $return_data['data'] as $key => $target_post ) {
|
||||
$sort_num = $key + 1;
|
||||
$no_order = self::is_sort_post_registered( $target_post->ID, $return_data['meta_key'] ) ? '' : ' no_order';
|
||||
$no_order = self::is_sort_post_registered( $target_post->ID, $return_data['meta_key'] ) ? '' : ' no-order';
|
||||
$list[] = '
|
||||
<li class="product-list' . esc_html( $no_order ) . '">' . esc_html( self::crate_non_registerd_mark( $no_order ) )
|
||||
. '<span class="sort-num-label">' . esc_html( $sort_num ) . '</span>' . get_the_title( $target_post->ID ) . '
|
||||
<input type="hidden" class="list_order"
|
||||
<li class="product-list' . esc_html( $no_order ) . '">' . '<span class="sort-num-label">' . esc_html( $sort_num ) . '</span>' . get_the_title( $target_post->ID ) . '
|
||||
<input type="hidden" class="list-order"
|
||||
name="_apop_post_' . esc_html( self::create_post_sort_key( $tax_data->taxonomy, $tax_key ) ) . '[post_sort][' . esc_html( $tax_data->term_id ) . '][' . esc_html( $target_post->ID ) . ']"
|
||||
value="' . esc_html( $sort_num ) . '">
|
||||
</li>';
|
||||
@@ -339,13 +329,14 @@ value="' . esc_html( $sort_num ) . '">
|
||||
$value_type = $cnv_order_params[ $target_key ]['value_type'];
|
||||
$name_meta_key = '_' . $name_key . '[' . $target_key . '][field][meta_key]';
|
||||
$name_value_type = '_' . $name_key . '[' . $target_key . '][field][value_type]';
|
||||
echo '<div class="sort_custom_field">
|
||||
<div class="sort_custom_field_inner"><div class="sort_custom_field_inner_label">カスタムフィールドキー:</div>
|
||||
echo '<div class="sort-custom-field">
|
||||
<div class="sort-custom-field-inner"><div class="sort-custom-field-inner-label">カスタムフィールドキー:</div>
|
||||
<input type="text" class="custom_field_key" name="' . esc_attr( $name_meta_key ) . '" value="' . esc_attr( $meta_key ) . '">
|
||||
</div>
|
||||
<div class="sort_custom_field_inner">
|
||||
<div class="sort_custom_field_inner_label">値タイプ:</div>
|
||||
<label><input type="radio"
|
||||
<div class="sort-custom-field-inner">
|
||||
<div class="sort-custom-field-inner-label">値タイプ:</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>
|
||||
@@ -362,7 +353,7 @@ value="' . esc_html( $sort_num ) . '">
|
||||
$param = array(
|
||||
'use' => 0,
|
||||
'sort' => 2,
|
||||
'no_order_class' => ' no_order',
|
||||
'no_order_class' => ' no-order',
|
||||
);
|
||||
|
||||
if ( strpos( $target_key, 'custom_field' ) !== false ) {
|
||||
@@ -376,7 +367,7 @@ value="' . esc_html( $sort_num ) . '">
|
||||
$param = array(
|
||||
'use' => $order_param[ $target_key ]['use'] ?? 0,
|
||||
'sort' => $order_param[ $target_key ]['sort'] ?? 2,
|
||||
'no_order_class' => ! $order_param[ $target_key ]['use'] ? ' no_order' : '',
|
||||
'no_order_class' => ! $order_param[ $target_key ]['use'] ? ' no-order' : '',
|
||||
);
|
||||
if ( strpos( $target_key, 'custom_field' ) !== false ) {
|
||||
$param[ $target_key ] = array(
|
||||
@@ -443,11 +434,5 @@ value="' . esc_html( $sort_num ) . '">
|
||||
}
|
||||
}
|
||||
|
||||
// public static function is_disp_per_page( &$disp, $disp_per_page ) {
|
||||
// if ( $disp_per_page ) {
|
||||
// $disp = true;
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user