PluginProbe
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO / 2.9.0
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO v2.9.0
2.9.0 2.8.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 All 50 releases
← All changes | includes/editor/class-blocks-manager.php +11 -1 2.1.12.9.0 View file →
@@ -162,8 +162,18 @@
162 162 if (array_key_exists('outputSchema', $attrs) && false === $attrs['outputSchema']) {
163 163 return $block_content;
164 164 }
165 165
166 + // The Schema master switch and the matrix's per-content-type switch.
167 + // This producer writes its own <script> into the block's markup rather
168 + // than registering with Schema_Graph, so gating the graph does not
169 + // reach it — a block kept publishing FAQPage/HowTo/ItemList with Schema
170 + // switched off (#688).
171 + if (class_exists('ThinkRank\\Frontend\\Schema_Graph')
172 + && !\ThinkRank\Frontend\Schema_Graph::output_allowed()) {
173 + return $block_content;
174 + }
175 +
166 176 if (self::FAQ_BLOCK === $name) {
167 177 // Saved markup carries a bare <img src>, because save.js output is
168 178 // what the block validates against and cannot be changed without
169 179 // invalidating every FAQ block already in the wild. Upgrading it
@@ -210,9 +220,9 @@
210 220 if (false === $json) {
211 221 return $block_content;
212 222 }
213 223
214 - return $block_content . "\n" . '<script type="application/ld+json">' . $json . '</script>';
224 + return $block_content . "\n" . '<script type="application/ld+json" data-thinkrank="block">' . $json . '</script>';
215 225 }
216 226
217 227 /**
218 228 * Resolve a FAQ item's image to what should actually be rendered.