| @@ -93,9 +93,9 @@ | ||
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | if ( $post_not_in ) { |
| 96 | 96 | $post_not_in = explode( ',', $post_not_in ); |
| 97 | - $this->args['exclude'] = $post_not_in; | |
| 97 | + $this->args['exclude'] = $post_not_in; // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude | |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | if ( $author_in ) { |
| 101 | 101 | $this->args['author'] = $author_in; |
| @@ -134,9 +134,9 @@ | ||
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | if ( $cats_not_in ) { |
| 137 | 137 | $cats_not_in = array_filter( explode( ',', $cats_not_in ) ); |
| 138 | - $this->args['exclude'] = $cats_not_in; | |
| 138 | + $this->args['exclude'] = $cats_not_in; // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude | |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | $this->args['number'] = $limit; |
| 142 | 142 | $this->args['hide_empty'] = $this->meta['show_empty'] ? 0 : 1; |
| @@ -187,8 +187,13 @@ | ||
| 187 | 187 | $this->args['orderby'] = $order_by; |
| 188 | 188 | |
| 189 | 189 | if ( 'menu_order' === $order_by ) { |
| 190 | 190 | $this->args['orderby'] = 'menu_order title'; |
| 191 | + } | |
| 192 | + | |
| 193 | + if ( 'price' === $order_by ) { | |
| 194 | + $this->args['orderby'] = 'meta_value_num'; | |
| 195 | + $this->args['meta_key'] = '_price'; // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key | |
| 191 | 196 | } |
| 192 | 197 | } |
| 193 | 198 | |
| 194 | 199 | return $this; |