From 83187e8ea0a34a8d28497ca00ba5d54be6d41431 Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Thu, 18 May 2017 14:44:43 +0000 Subject: [PATCH] Dashboard: Document request proxy for events. Documents the reason why the request is proxied through WP, instead of being made directly to api.wordpress.org. Props iandunn, michelleweber. See #40702. Built from https://develop.svn.wordpress.org/trunk@40777 git-svn-id: http://core.svn.wordpress.org/trunk@40635 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-community-events.php | 15 +++++++++++++-- wp-includes/version.php | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/class-wp-community-events.php b/wp-admin/includes/class-wp-community-events.php index f388c3a957..24a9860bd0 100644 --- a/wp-admin/includes/class-wp-community-events.php +++ b/wp-admin/includes/class-wp-community-events.php @@ -67,11 +67,22 @@ class WP_Community_Events { * data. The API will send back a recognized location based on the data, along * with nearby events. * + * The browser's request for events is proxied with this method, rather + * than having the browser make the request directly to api.wordpress.org, + * because it allows results to be cached server-side and shared with other + * users and sites in the network. This makes the process more efficient, + * since increasing the number of visits that get cached data means users + * don't have to wait as often; if the user's browser made the request + * directly, it would also need to make a second request to WP in order to + * pass the data for caching. Having WP make the request also introduces + * the opportunity to anonymize the IP before sending it to w.org, which + * mitigates possible privacy concerns. + * * @since 4.8.0 * - * @param string $location_search Optional city name to help determine the location. + * @param string $location_search Optional. City name to help determine the location. * e.g., "Seattle". Default empty string. - * @param string $timezone Optional timezone to help determine the location. + * @param string $timezone Optional. Timezone to help determine the location. * Default empty string. * @return array|WP_Error A WP_Error on failure; an array with location and events on * success. diff --git a/wp-includes/version.php b/wp-includes/version.php index ba2f1c6d8b..6a39386483 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.8-beta1-40776'; +$wp_version = '4.8-beta1-40777'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.