WP PLUGIN 変数定義チェック漏れ等の修正

・変数チェック漏れの修正
・スタイル修正
This commit is contained in:
2021-06-18 16:32:53 +09:00
parent 0d102684e3
commit f9fe860c81
3 changed files with 18 additions and 6 deletions
+1 -1
View File
@@ -302,7 +302,7 @@ value="' . esc_html( $sort_num ) . '">
$no_order_class = $cnv_order_params['no_order_class'];
$field_metakey_input = '';
$name_use_key = '_' . $name_key . '[' . $target_key . '][use]';
$name_sort_key = '_' . $name_key . '[' . $target_key . '][ sort ]';
$name_sort_key = '_' . $name_key . '[' . $target_key . '][sort]';
if ( strpos( $target_key, 'custom_field' ) !== false ) {
$meta_key = $cnv_order_params[ $target_key ]['meta_key'];
$value_type = $cnv_order_params[ $target_key ]['value_type'];
+9
View File
@@ -165,6 +165,11 @@ dl.apop_setting_list_dd dd input {
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 {
background: #ababab;
}
@@ -294,6 +299,10 @@ dl.apop_setting_list_dd dd input {
.search_normal_sort .product-list-sort-type label {
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) {
+5 -2
View File
@@ -91,7 +91,6 @@ if ( ! trait_exists( 'APOP_ORDER_SETTING' ) ) {
private static function set_custom_filed_sort( &$orderby, $order_col, $orders, $sort_param ): array {
if ( strpos( $order_col, 'custom_field' ) !== false ) {
$meta_key = APOP_CUSTOM_FIELD_PREFIX . $orders['field']['meta_key'];
$orderby_sort = $orders['sort'];
$type = 'CHAR';
if ( $orders['field']['value_type'] == 'meta_value_num' ) {
$type = 'NUMERIC';
@@ -100,7 +99,9 @@ if ( ! trait_exists( 'APOP_ORDER_SETTING' ) ) {
} elseif ( $orders['field']['value_type'] == 'meta_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 );
}
@@ -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 );
$meta_query[] = self::get_all_post_args( $sort_meta_key, $type );
} else {
if ( isset( $orders['sort'] ) ) {
$orderby[ $order_col ] = $sort_param[ $orders['sort'] ];
}
}
}
}
return array(
'meta_query' => $meta_query,