wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



switch_to_user_locale › WordPress Function

Od6.2.0
Przestarzałyn/a
switch_to_user_locale ( $user_id )
Parametry:
  • (int) $user_id User ID.
    Wymagane: Tak
Powrót:
  • (bool) True on success, false on failure.
Zdefiniowane na:
Codex:

Switches the translations according to the given user's locale.



Źródło

function switch_to_user_locale( $user_id ) {
	/* @var WP_Locale_Switcher $wp_locale_switcher */
	global $wp_locale_switcher;

	if ( ! $wp_locale_switcher ) {
		return false;
	}

	return $wp_locale_switcher->switch_to_user_locale( $user_id );
}