Updates: Add the `core_version_check_query_args` filter.

This filter allows the data being sent for core update checks to be controlled for privacy concerns.

Props toscho, MattyRob, swissspidy, pento.
Fixes #16778.



git-svn-id: https://develop.svn.wordpress.org/trunk@41962 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast 2017-10-21 11:54:47 +00:00
parent dbfb9f0f0b
commit 5233a95355
1 changed files with 12 additions and 0 deletions

View File

@ -97,6 +97,18 @@ function wp_version_check( $extra_stats = array(), $force_check = false ) {
'initial_db_version' => get_site_option( 'initial_db_version' ),
);
/**
* Filter 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
*
* @param array $query Version check query arguments.
*/
$query = apply_filters( 'core_version_check_query_args', $query );
$post_body = array(
'translations' => wp_json_encode( $translations ),
);