pre_determine_locale WordPress Filter Hook

The pre_determine_locale hook is a hook that is called before the locale is determined. This can be useful for changing the locale based on a user's settings or environment.

apply_filters( 'pre_determine_locale', string|null $locale ) #

Filters the locale for the current request prior to the default determination process.


Description

Using this filter allows to override the default logic, effectively short-circuiting the function.


Top ↑

Parameters

$locale

(string|null)The locale to return and short-circuit. Default null.


Top ↑

Source

File: wp-includes/l10n.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.