core_version_check_query_args
Filter HookDescription
Filters the query arguments sent as part of the core version check. WARNING: Changing this data may result in your site not receiving security updates. Please exercise extreme caution. }Hook Information
File Location |
wp-includes/update.php
View on GitHub
|
Hook Type | Filter |
Line Number | 176 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$query
|
{ Version check query arguments. |
Usage Examples
Basic Usage
<?php
// Hook into core_version_check_query_args
add_filter('core_version_check_query_args', 'my_custom_filter', 10, 1);
function my_custom_filter($query) {
// Your custom filtering logic here
return $query;
}
Source Code Context
wp-includes/update.php:176
- How this hook is used in WordPress core
<?php
171 * @type array $extensions List of PHP extensions and their versions.
172 * @type array $platform_flags List containing the operating system name and bit support.
173 * @type array $image_support List of image formats supported by GD and Imagick.
174 * }
175 */
176 $query = apply_filters( 'core_version_check_query_args', $query );
177
178 $post_body = array(
179 'translations' => wp_json_encode( $translations ),
180 );
181
PHP Documentation
<?php
/**
* Filters the query arguments sent as part of the core version check.
*
* WARNING: Changing this data may result in your site not receiving security updates.
* Please exercise extreme caution.
*
* @since 4.9.0
* @since 6.1.0 Added `$extensions`, `$platform_flags`, and `$image_support` to the `$query` parameter.
*
* @param array $query {
* Version check query arguments.
*
* @type string $version WordPress version number.
* @type string $php PHP version number.
* @type string $locale The locale to retrieve updates for.
* @type string $mysql MySQL version number.
* @type string $local_package The value of the $wp_local_package global, when set.
* @type int $blogs Number of sites on this WordPress installation.
* @type int $users Number of users on this WordPress installation.
* @type int $multisite_enabled Whether this WordPress installation uses Multisite.
* @type int $initial_db_version Database version of WordPress at time of installation.
* @type array $extensions List of PHP extensions and their versions.
* @type array $platform_flags List containing the operating system name and bit support.
* @type array $image_support List of image formats supported by GD and Imagick.
* }
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/update.php
Related Hooks
Related hooks will be displayed here in future updates.