From f7fcb2cd5bb38326f082a1503901de4389a4a3c0 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Sat, 21 Oct 2017 11:55:47 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@41962 git-svn-id: http://core.svn.wordpress.org/trunk@41796 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/update.php | 12 ++++++++++++ wp-includes/version.php | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/wp-includes/update.php b/wp-includes/update.php index f178470a36..4b6f1851b7 100644 --- a/wp-includes/update.php +++ b/wp-includes/update.php @@ -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 ), ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 348aa15d26..25cf3ba781 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9-beta3-41961'; +$wp_version = '4.9-beta3-41962'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.