WP_Locale_Switcher::filter_locale

Advertisement

Summery Summery

Filters the locale of the WordPress installation.

Syntax Syntax

WP_Locale_Switcher::filter_locale( string $locale )

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;
	}

Advertisement

Changelog Changelog

Changelog
Version Description
4.7.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

What are you looking for?