core_version_check_query_args
云策文档标注
概述
core_version_check_query_args 是一个 WordPress 过滤器,用于修改核心版本检查时发送的查询参数。更改这些参数可能导致网站无法接收安全更新,需谨慎操作。
关键要点
- 过滤器名称:core_version_check_query_args
- 主要用途:过滤核心版本检查的查询参数数组
- 参数:$query 数组,包含版本、PHP、MySQL、locale、站点统计等信息
- 警告:修改可能影响安全更新接收,需极端谨慎
- 相关函数:wp_version_check()
- 变更历史:6.1.0 版本添加了 $extensions、$platform_flags 和 $image_support 参数
代码示例
$query = apply_filters( 'core_version_check_query_args', $query );注意事项
更改此过滤器数据可能导致网站无法接收安全更新,请务必谨慎操作。
原文内容
Filters the query arguments sent as part of the core version check.
Description
WARNING: Changing this data may result in your site not receiving security updates.
Please exercise extreme caution.
Parameters
$queryarray-
Version check query arguments.
versionstringWordPress version number.phpstringPHP version number.localestringThe locale to retrieve updates for.mysqlstringMySQL version number.local_packagestringThe value of the $wp_local_package global, when set.blogsintNumber of sites on this WordPress installation.usersintNumber of users on this WordPress installation.multisite_enabledintWhether this WordPress installation uses Multisite.initial_db_versionintDatabase version of WordPress at time of installation.extensionsarrayList of PHP extensions and their versions.platform_flagsarrayList containing the operating system name and bit support.image_supportarrayList of image formats supported by GD and Imagick.
Source
$query = apply_filters( 'core_version_check_query_args', $query );