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/beaver/howto/howto.php +10 -1 2.5.0 → 2.9.0 View file →
@@ -235,8 +235,17 @@
235 235 * @param array $items Usable steps.
236 236 * @return void
237 237 */
238 238 private function maybe_render_schema(array $settings, array $items): void {
239 +
240 + // The Schema master switch and the matrix's per-content-type switch.
241 + // This widget echoes its own <script> rather than registering with
242 + // Schema_Graph, so gating the graph never reached it and it kept
243 + // publishing with Schema switched off (#688).
244 + if (class_exists('ThinkRank\\Frontend\\Schema_Graph')
245 + && !\ThinkRank\Frontend\Schema_Graph::output_allowed()) {
246 + return;
247 + }
239 248 if (empty($settings['output_schema']) || self::in_builder()) {
240 249 return;
241 250 }
242 251
@@ -292,9 +301,9 @@
292 301
293 302 $json = wp_json_encode($schema, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT);
294 303
295 304 if (false !== $json) {
296 - echo '<script type="application/ld+json">' . $json . '</script>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
305 + echo '<script type="application/ld+json" data-thinkrank="howto">' . $json . '</script>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
297 306 }
298 307 }
299 308
300 309 /**