switch_locale

switch_locale

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: wordpress-6.7

do_action('switch_locale') is found 1 times:

  • /wp-includes/class-wp-locale-switcher.php line 98
    		 *
    		 * @param string    $locale  The new locale.
    		 * @param false|int $user_id User ID for context if available.
    		 */
    		do_action( 'switch_locale', $locale, $user_id );
    
    		return true;
    	}
    
    	/**
    	 * Switches the translations according to the given user's locale.