wpseo_og_locale хук-фильтрYoast 1.0

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                 $presentation->open_graph_locale The locale string
 * @param Indexable_Presentation $presentation                    The presentation of an indexable.
 *
 * @return string
 */
function wp_kama_wpseo_og_locale_filter( $presentation->open_graph_locale, $presentation ){

	// filter...
	return $presentation->open_graph_locale;
}
$presentation->open_graph_locale(строка)
The locale string
$presentation(Indexable_Presentation)
The presentation of an indexable.

Где вызывается хук

Locale_Presenter::get()
wpseo_og_locale
yoast/src/presenters/open-graph/locale-presenter.php 40
return (string) \trim( \apply_filters( 'wpseo_og_locale', $this->presentation->open_graph_locale, $this->presentation ) );

Где используется хук в Yoast SEO

Использование не найдено.