WP_Locale_Switcher::get_switched_locale()
Returns the locale currently switched to.
Return
(string|false) Locale if the locale has been switched, false otherwise.
Source
File: wp-includes/class-wp-locale-switcher.php
public function get_switched_locale() {
$entry = end( $this->stack );
if ( $entry ) {
return $entry[0];
}
return false;
}
Changelog
Version | Description |
---|---|
6.2.0 | Introduced. |