determine_locale
Filters the locale for the current request.
Usage
add_filter( 'determine_locale', 'wp_kama_determine_locale_filter' ); /** * Function for `determine_locale` filter-hook. * * @param string $locale The locale. * * @return string */ function wp_kama_determine_locale_filter( $locale ){ // filter... return $locale; }
- $locale(string)
- The locale.
Changelog
Since 5.0.0 | Introduced. |
Where the hook is called
determine_locale
wp-includes/l10n.php 166
return apply_filters( 'determine_locale', $determined_locale );
Where the hook is used in WordPress
wp-includes/class-wp-locale-switcher.php 63
add_filter( 'determine_locale', array( $this, 'filter_locale' ) );