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.


Top ↑

Source

File: wp-includes/update.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.8.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.