wpseo_json_ld_output
Filter: wpseo_json_ld_output Allows disabling Yoast's schema output entirely.
Использование
add_filter( 'wpseo_json_ld_output', 'wp_kama_wpseo_json_ld_output_filter', 10, 2 ); /** * Function for `wpseo_json_ld_output` filter-hook. * * @param mixed $deprecated_data If false or an empty array is returned, disable our output. * @param $string * * @return mixed */ function wp_kama_wpseo_json_ld_output_filter( $deprecated_data, $string ){ // filter... return $deprecated_data; }
- $deprecated_data(разное)
- If false or an empty array is returned, disable our output.
- $string
- -
Где вызывается хук
wpseo_json_ld_output
yoast/src/presenters/schema-presenter.php 34
$return = \apply_filters( 'wpseo_json_ld_output', $deprecated_data, '' );