WP_Locale_Switcher::filter_locale( string $locale )

Filters the locale of the ClassicPress installation.


Parameters

$locale

(Required) The locale of the ClassicPress installation.


Return

(string) The locale currently being switched to.


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

Changelog

Changelog
Version Description
WP-4.7.0 Introduced.