The core_version_check_query_args WordPress PHP filter allows you to modify the query arguments sent during the core version check.
Usage
add_filter('core_version_check_query_args', 'your_custom_function'); function your_custom_function($query) { // your custom code here return $query; }
Parameters
$query
(array): Version check query arguments including:version
(string): WordPress version number.php
(string): PHP version number.locale
(string): The locale to retrieve updates for.mysql
(string): MySQL version number.local_package
(string): The value of the$wp_local_package
global, when set.blogs
(int): Number of sites on this WordPress installation.users
(int): Number of users on this WordPress installation.multisite_enabled
(int): Whether this WordPress installation uses Multisite.initial_db_version
(int): Database version of WordPress at time of installation.
More information
See WordPress Developer Resources: core_version_check_query_args
WARNING: Changing this data may result in your site not receiving security updates. Please exercise extreme caution.
Examples
Change the locale of core updates
Modify the locale of the core updates to retrieve updates for a different language.
add_filter('core_version_check_query_args', 'change_core_update_locale'); function change_core_update_locale($query) { $query['locale'] = 'es_ES'; // Change the locale to Spanish return $query; }
Change the PHP version number
Update the PHP version number sent during the core version check.
add_filter('core_version_check_query_args', 'change_php_version_number'); function change_php_version_number($query) { $query['php'] = '7.4.0'; // Change the PHP version number return $query; }
Modify the MySQL version number
Update the MySQL version number sent during the core version check.
add_filter('core_version_check_query_args', 'change_mysql_version_number'); function change_mysql_version_number($query) { $query['mysql'] = '5.7.0'; // Change the MySQL version number return $query; }
Change the initial database version
Update the initial database version sent during the core version check.
add_filter('core_version_check_query_args', 'change_initial_db_version'); function change_initial_db_version($query) { $query['initial_db_version'] = '12345'; // Change the initial database version return $query; }
Change the number of users
Update the number of users sent during the core version check.
add_filter('core_version_check_query_args', 'change_number_of_users'); function change_number_of_users($query) { $query['users'] = '1500'; // Change the number of users return $query; }