PluginProbe
Search Atlas SEO – OTTO AI SEO Automation for WordPress / 2.7.1
Search Atlas SEO – OTTO AI SEO Automation for WordPress v2.7.1
2.7.1 2.7.2 2.7.0 2.6.26 2.6.25 2.6.24 2.6.23 2.6.22 2.6.21 2.6.20 2.6.19 2.6.18 2.6.17 2.6.16 2.6.15 2.6.14 2.6.13 2.6.12 2.6.11 2.6.10 2.6.9 2.6.8 2.6.7 2.6.6 2.6.5 All 141 releases
← All changes | includes/class-metasync-seo-inventory-builder.php +19 -7 2.6.26 → 2.7.1 View file →
@@ -90,15 +90,21 @@
90 90 }
91 91
92 92 // Exclude custom/LPS pages — their SEO is self-managed, so the platform
93 93 // must not treat them as "missing SEO".
94 - $query_args['meta_query'] = [metasync_get_custom_page_exclusion_meta_query()];
94 + $query_args['metasync_exclude_custom_pages'] = true;
95 + add_filter('posts_where', 'metasync_filter_exclude_custom_pages_where', 10, 2);
95 96
96 - $query = new WP_Query($query_args);
97 + try {
98 + $query = new WP_Query($query_args);
99 + } finally {
100 + // Remove filters immediately so they don't affect other queries
101 + if ($cursor > 0) {
102 + remove_filter('posts_where', [__CLASS__, 'filter_where_id_gt'], 10);
103 + }
104 + remove_filter('posts_where', 'metasync_filter_exclude_custom_pages_where', 10);
105 + }
97 106
98 - // Remove the filter immediately so it doesn't affect other queries
99 - remove_filter('posts_where', [__CLASS__, 'filter_where_id_gt'], 10);
100 -
101 107 $posts = $query->posts;
102 108 $has_more = count($posts) > $limit;
103 109
104 110 if ($has_more) {
@@ -242,9 +248,9 @@
242 248 'update_post_term_cache' => false,
243 249 // Exclude custom/LPS pages so the total matches the excluded item list
244 250 // in build() — otherwise the platform sees a count larger than the
245 251 // number of items it can page through.
246 - 'meta_query' => [metasync_get_custom_page_exclusion_meta_query()],
252 + 'metasync_exclude_custom_pages' => true,
247 253 ];
248 254
249 255 if (!empty($modified_after)) {
250 256 $args['date_query'] = [
@@ -255,9 +261,15 @@
255 261 ],
256 262 ];
257 263 }
258 264
259 - $query = new WP_Query($args);
265 + add_filter('posts_where', 'metasync_filter_exclude_custom_pages_where', 10, 2);
266 + try {
267 + $query = new WP_Query($args);
268 + } finally {
269 + remove_filter('posts_where', 'metasync_filter_exclude_custom_pages_where', 10);
270 + }
271 +
260 272 return (int) $query->found_posts;
261 273 }
262 274
263 275 /**