determine_locale
Filter HookDescription
Filters the locale for the current request.Hook Information
File Location |
wp-includes/l10n.php
View on GitHub
|
Hook Type | Filter |
Line Number | 176 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$determined_locale
|
The locale. |
Usage Examples
Basic Usage
<?php
// Hook into determine_locale
add_filter('determine_locale', 'my_custom_filter', 10, 1);
function my_custom_filter($determined_locale) {
// Your custom filtering logic here
return $determined_locale;
}
Source Code Context
wp-includes/l10n.php:176
- How this hook is used in WordPress core
<?php
171 *
172 * @since 5.0.0
173 *
174 * @param string $determined_locale The locale.
175 */
176 return apply_filters( 'determine_locale', $determined_locale );
177 }
178
179 /**
180 * Retrieves the translation of $text.
181 *
PHP Documentation
<?php
/**
* Filters the locale for the current request.
*
* @since 5.0.0
*
* @param string $determined_locale The locale.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/l10n.php
Related Hooks
Related hooks will be displayed here in future updates.