| @@ -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 |