WP_Locale_Switcher::get_switched_user_id()
Returns the user ID related to the currently switched locale.
Return
(int|false) User ID if set and if the locale has been switched, false otherwise.
Source
File: wp-includes/class-wp-locale-switcher.php
public function get_switched_user_id() {
$entry = end( $this->stack );
if ( $entry ) {
return $entry[1];
}
return false;
}
Changelog
Version | Description |
---|---|
6.2.0 | Introduced. |