WP_Locale_Switcher::filter_locale( string $locale )
Filters the locale of the WordPress installation.
Description Description
Parameters Parameters
- $locale
-
(string) (Required) The locale of the WordPress installation.
Return Return
(string) The locale currently being switched to.
Source Source
File: wp-includes/class-wp-locale-switcher.php
public function filter_locale( $locale ) { $switched_locale = end( $this->locales ); if ( $switched_locale ) { return $switched_locale; } return $locale; }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |