| @@ -150,8 +150,17 @@ | ||
| 150 | 150 | * @param array $items Non-empty FAQ items. |
| 151 | 151 | * @return void |
| 152 | 152 | */ |
| 153 | 153 | private function maybe_render_schema(array $settings, array $items): void { |
| 154 | + | |
| 155 | + // The Schema master switch and the matrix's per-content-type switch. | |
| 156 | + // This widget echoes its own <script> rather than registering with | |
| 157 | + // Schema_Graph, so gating the graph never reached it and it kept | |
| 158 | + // publishing with Schema switched off (#688). | |
| 159 | + if (class_exists('ThinkRank\\Frontend\\Schema_Graph') | |
| 160 | + && !\ThinkRank\Frontend\Schema_Graph::output_allowed()) { | |
| 161 | + return; | |
| 162 | + } | |
| 154 | 163 | if ('yes' !== ($settings['output_schema'] ?? 'yes')) { |
| 155 | 164 | return; |
| 156 | 165 | } |
| 157 | 166 | |