WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
122 | /** |
123 | * Filters the locale for the current request prior to the default determination process. |
124 | * |
125 | * Using this filter allows to override the default logic, effectively short-circuiting the function. |
126 | * |
127 | * @since 5.0.0 |
128 | * |
129 | * @param string|null $locale The locale to return and short-circuit. Default null. |
130 | */ |
131 | $determined_locale = apply_filters( 'pre_determine_locale', null ); |
132 |
|
133 | if ( ! empty( $determined_locale ) && is_string( $determined_locale ) ) { |
134 | return $determined_locale; |
135 | } |
136 |
|
137 | $determined_locale = get_locale(); |
138 |
|
139 | if ( is_admin() ) { |
140 | $determined_locale = get_user_locale(); |