| @@ -93,9 +93,16 @@ | ||
| 93 | 93 | $output .= '</div>'; |
| 94 | 94 | |
| 95 | 95 | echo $output; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 96 | 96 | |
| 97 | - $this->render_builder_script($uid, $max_level, !empty($settings['output_schema'])); | |
| 97 | + // The TOC schema is built client-side, so it bypasses both Schema_Graph | |
| 98 | + // and the block filter and kept publishing an ItemList with Schema | |
| 99 | + // switched off (#688). | |
| 100 | + $schema = !empty($settings['output_schema']) | |
| 101 | + && (!class_exists('ThinkRank\\Frontend\\Schema_Graph') | |
| 102 | + || \ThinkRank\Frontend\Schema_Graph::output_allowed()); | |
| 103 | + | |
| 104 | + $this->render_builder_script($uid, $max_level, $schema); | |
| 98 | 105 | } |
| 99 | 106 | |
| 100 | 107 | /** |
| 101 | 108 | * The dependency-free script that fills the list in. |