| @@ -187,9 +187,15 @@ | ||
| 187 | 187 | $output .= '</div>'; |
| 188 | 188 | |
| 189 | 189 | echo $output; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 190 | 190 | |
| 191 | - $this->render_builder_script($uid, $max_level, !empty($settings['outputSchema'])); | |
| 191 | + // Built client-side, so it bypasses Schema_Graph and the block filter | |
| 192 | + // and kept publishing an ItemList with Schema switched off (#688). | |
| 193 | + $schema = !empty($settings['outputSchema']) | |
| 194 | + && (!class_exists('ThinkRank\\Frontend\\Schema_Graph') | |
| 195 | + || \ThinkRank\Frontend\Schema_Graph::output_allowed()); | |
| 196 | + | |
| 197 | + $this->render_builder_script($uid, $max_level, $schema); | |
| 192 | 198 | } |
| 193 | 199 | |
| 194 | 200 | /** |
| 195 | 201 | * The dependency-free script that fills the list in. |