disable_wpseo_json_ld_search
Filter: disable_wpseo_json_ld_search Allow disabling of the json+ld output.
Использование
add_filter( 'disable_wpseo_json_ld_search', 'wp_kama_disable_wpseo_json_ld_search_filter' );
/**
* Function for `disable_wpseo_json_ld_search` filter-hook.
*
* @param bool $display_search Whether or not to display json+ld search on the frontend.
*
* @return bool
*/
function wp_kama_disable_wpseo_json_ld_search_filter( $display_search ){
// filter...
return $display_search;
}
- $display_search(true|false)
- Whether or not to display json+ld search on the frontend.
Где вызывается хук
disable_wpseo_json_ld_search
yoast/src/generators/schema/website.php 76
if ( \apply_filters( 'disable_wpseo_json_ld_search', false ) ) {