WP PLUGIN 変数定義チェック漏れ等の修正
・変数チェック漏れの修正 ・スタイル修正
This commit is contained in:
@@ -165,6 +165,11 @@ dl.apop_setting_list_dd dd input {
|
|||||||
width: calc((100% / 4) - 5px);
|
width: calc((100% / 4) - 5px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.search_normal_sort .product-list-sort-type label:first-of-type {
|
||||||
|
width: 5em;
|
||||||
|
margin-right: 3em;
|
||||||
|
}
|
||||||
|
|
||||||
.product-list.no_order {
|
.product-list.no_order {
|
||||||
background: #ababab;
|
background: #ababab;
|
||||||
}
|
}
|
||||||
@@ -294,6 +299,10 @@ dl.apop_setting_list_dd dd input {
|
|||||||
.search_normal_sort .product-list-sort-type label {
|
.search_normal_sort .product-list-sort-type label {
|
||||||
width: calc((100% / 3) - 5px);
|
width: calc((100% / 3) - 5px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.search_normal_sort .product-list-sort-type label:first-of-type {
|
||||||
|
margin-right: 1em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 964px) {
|
@media only screen and (max-width: 964px) {
|
||||||
|
|||||||
@@ -91,7 +91,6 @@ if ( ! trait_exists( 'APOP_ORDER_SETTING' ) ) {
|
|||||||
private static function set_custom_filed_sort( &$orderby, $order_col, $orders, $sort_param ): array {
|
private static function set_custom_filed_sort( &$orderby, $order_col, $orders, $sort_param ): array {
|
||||||
if ( strpos( $order_col, 'custom_field' ) !== false ) {
|
if ( strpos( $order_col, 'custom_field' ) !== false ) {
|
||||||
$meta_key = APOP_CUSTOM_FIELD_PREFIX . $orders['field']['meta_key'];
|
$meta_key = APOP_CUSTOM_FIELD_PREFIX . $orders['field']['meta_key'];
|
||||||
$orderby_sort = $orders['sort'];
|
|
||||||
$type = 'CHAR';
|
$type = 'CHAR';
|
||||||
if ( $orders['field']['value_type'] == 'meta_value_num' ) {
|
if ( $orders['field']['value_type'] == 'meta_value_num' ) {
|
||||||
$type = 'NUMERIC';
|
$type = 'NUMERIC';
|
||||||
@@ -100,7 +99,9 @@ if ( ! trait_exists( 'APOP_ORDER_SETTING' ) ) {
|
|||||||
} elseif ( $orders['field']['value_type'] == 'meta_date' ) {
|
} elseif ( $orders['field']['value_type'] == 'meta_date' ) {
|
||||||
$type = 'DATE';
|
$type = 'DATE';
|
||||||
}
|
}
|
||||||
$orderby[ $meta_key ] = $sort_param[ $orderby_sort ];
|
if ( isset( $orders['sort'] ) ) {
|
||||||
|
$orderby[ $meta_key ] = $sort_param[ $orders['sort'] ];
|
||||||
|
}
|
||||||
|
|
||||||
return array( $meta_key, $type );
|
return array( $meta_key, $type );
|
||||||
}
|
}
|
||||||
@@ -188,10 +189,12 @@ if ( ! trait_exists( 'APOP_ORDER_SETTING' ) ) {
|
|||||||
list( $sort_meta_key, $type ) = self::set_custom_filed_sort( $orderby, $order_col, $orders, $sort_param );
|
list( $sort_meta_key, $type ) = self::set_custom_filed_sort( $orderby, $order_col, $orders, $sort_param );
|
||||||
$meta_query[] = self::get_all_post_args( $sort_meta_key, $type );
|
$meta_query[] = self::get_all_post_args( $sort_meta_key, $type );
|
||||||
} else {
|
} else {
|
||||||
|
if ( isset( $orders['sort'] ) ) {
|
||||||
$orderby[ $order_col ] = $sort_param[ $orders['sort'] ];
|
$orderby[ $order_col ] = $sort_param[ $orders['sort'] ];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'meta_query' => $meta_query,
|
'meta_query' => $meta_query,
|
||||||
|
|||||||
Reference in New Issue
Block a user