core_version_check_locale
Filter HookDescription
Filters the locale requested for WordPress core translations.Hook Information
File Location |
wp-includes/update.php
View on GitHub
|
Hook Type | Filter |
Line Number | 74 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$locale
|
Current locale. |
Usage Examples
Basic Usage
<?php
// Hook into core_version_check_locale
add_filter('core_version_check_locale', 'my_custom_filter', 10, 1);
function my_custom_filter($locale) {
// Your custom filtering logic here
return $locale;
}
Source Code Context
wp-includes/update.php:74
- How this hook is used in WordPress core
<?php
69 *
70 * @since 2.8.0
71 *
72 * @param string $locale Current locale.
73 */
74 $locale = apply_filters( 'core_version_check_locale', get_locale() );
75
76 // Update last_checked for current to prevent multiple blocking requests if request hangs.
77 $current->last_checked = time();
78 set_site_transient( 'update_core', $current );
79
PHP Documentation
<?php
/**
* Filters the locale requested for WordPress core translations.
*
* @since 2.8.0
*
* @param string $locale Current locale.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/update.php
Related Hooks
Related hooks will be displayed here in future updates.