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 If false or an empty array is returned, disable our output. * @param string $empty * * @return mixed */ function wp_kama_wpseo_json_ld_output_filter( $deprecated, $empty ){ // filter... return $deprecated; }
- $deprecated(разное)
- If false or an empty array is returned, disable our output.
- $empty(строка)
- -
Где вызывается хук
wpseo_json_ld_output
yoast/src/presenters/schema-presenter.php 35
$return = \apply_filters( 'wpseo_json_ld_output', $deprecated_data, '' );