← All changes
|
includes/controls/group-query/group-control-query.php
+4
-0
3.0.8
→
3.1.4
View file →
| @@ -8,8 +8,11 @@ | ||
| 8 | 8 | if (! defined('ABSPATH')) { |
| 9 | 9 | exit; // Exit if accessed directly. |
| 10 | 10 | } |
| 11 | 11 | |
| 12 | +// phpcs:disable WordPressVIPMinimum.Performance.WPQueryParams -- WordPressVIPMinimum targets the VIP platform, not the plugin directory. These exclusionary parameters come from a widget's own "exclude" control: the list is whatever the site owner picked in Elementor, applied to a bounded result set, not an unbounded catalogue scan. | |
| 13 | +// phpcs:disable WordPress.DB.SlowDBQuery -- meta_query / tax_query / meta_key are the documented way to express these widget filters. Removing them means fetching every post and filtering in PHP, which is strictly slower. | |
| 14 | + | |
| 12 | 15 | trait Group_Control_Query |
| 13 | 16 | { |
| 14 | 17 | |
| 15 | 18 | public function register_query_builder_controls() |
| @@ -918,8 +921,9 @@ | ||
| 918 | 921 | return ['__use_global_query' => true]; |
| 919 | 922 | } |
| 920 | 923 | |
| 921 | 924 | $page = max(1, get_query_var('paged'), get_query_var('page')); |
| 925 | + // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Pagination number off a public archive URL; cast to int and used only to page a query. | |
| 922 | 926 | $page = absint(empty($_GET['product-page']) ? $page : $_GET['product-page']); |
| 923 | 927 | $paged = absint($page); |
| 924 | 928 | |
| 925 | 929 | $args = [ |