PluginProbe
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO / 2.7.0
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO v2.7.0
2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.1 2.1.0 2.0.2 2.0.1 2.0.0 1.32.0 1.31.0 1.30.0 1.29.0 1.28.0 1.27.0 1.26.0 1.25.0 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.10.0 All 48 releases
← All changes | includes/api/class-pillar-content-endpoint.php +8 -0 2.0.02.7.0 View file →
@@ -114,8 +114,9 @@
114 114 }
115 115
116 116 $taxonomies = get_object_taxonomies($post_type);
117 117 $tax_query = [];
118 + $has_terms = false;
118 119
119 120 if (!empty($taxonomies)) {
120 121 $tax_query['relation'] = 'OR';
121 122
@@ -132,8 +133,15 @@
132 133 $has_terms = true;
133 134 }
134 135 }
135 136 }
137 + }
138 +
139 + // Without this the query kept a tax_query holding nothing but
140 + // 'relation' => 'OR' whenever the post had no terms — $has_terms was
141 + // assigned and never read.
142 + if (!$has_terms) {
143 + $tax_query = [];
136 144 }
137 145
138 146 $args = [
139 147 'post_type' => $post_type,