core_version_check_locale WordPress Filter Hook
The core_version_check_locale hook is used to filter the locale used when checking for WordPress updates. This hook is useful for plugin and theme developers who want to ensure their products are compatible with the latest version of WordPress in all locales. By default, the update checker will use the locale set in the WordPress admin area. However, this hook allows you to override that setting. For example, if you are developing a plugin that is only compatible with the English version of WordPress, you would use this hook to force the update checker to use the English locale. This would ensure that your plugin is only displayed to users who are running the English version of WordPress. This hook is also useful for multilingual sites. If you have a site that is available in multiple languages, you can use this hook to check for updates in all of the site's languages. This would ensure that your site is always up-to-date, regardless of which language the user is viewing it in.
apply_filters( 'core_version_check_locale', string $locale ) #
Filters the locale requested for WordPress core translations.
Parameters
- $locale
(string)Current locale.
Source
File: wp-includes/update.php
Changelog
Version | Description |
---|---|
2.8.0 | Introduced. |