wpseo_og_locale
Filter: wpseo_og_locale Allow changing the Yoast SEO Open Graph locale.
Использование
add_filter( 'wpseo_og_locale', 'wp_kama_wpseo_og_locale_filter', 10, 2 ); /** * Function for `wpseo_og_locale` filter-hook. * * @param string $locale The locale string * @param Indexable_Presentation $presentation The presentation of an indexable. * * @return string */ function wp_kama_wpseo_og_locale_filter( $locale, $presentation ){ // filter... return $locale; }
- $locale(строка)
- The locale string
- $presentation(Indexable_Presentation)
- The presentation of an indexable.
Где вызывается хук
wpseo_og_locale
yoast/src/presenters/open-graph/locale-presenter.php 39
return (string) \trim( \apply_filters( 'wpseo_og_locale', $this->presentation->open_graph_locale, $this->presentation ) );