WordPress.org

Make WordPress Core

Changeset 40777


Ignore:
Timestamp:
05/18/17 14:43:47 (5 weeks ago)
Author:
obenland
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-community-events.php

    r40774 r40777  
    6868     * with nearby events. 
    6969     * 
    70      * @since 4.8.0 
    71      * 
    72      * @param string $location_search Optional city name to help determine the location. 
     70     * The browser's request for events is proxied with this method, rather 
     71     * than having the browser make the request directly to api.wordpress.org, 
     72     * because it allows results to be cached server-side and shared with other 
     73     * users and sites in the network. This makes the process more efficient, 
     74     * since increasing the number of visits that get cached data means users 
     75     * don't have to wait as often; if the user's browser made the request 
     76     * directly, it would also need to make a second request to WP in order to 
     77     * pass the data for caching. Having WP make the request also introduces 
     78     * the opportunity to anonymize the IP before sending it to w.org, which 
     79     * mitigates possible privacy concerns. 
     80     * 
     81     * @since 4.8.0 
     82     * 
     83     * @param string $location_search Optional. City name to help determine the location. 
    7384     *                                e.g., "Seattle". Default empty string. 
    74      * @param string $timezone        Optional timezone to help determine the location. 
     85     * @param string $timezone        Optional. Timezone to help determine the location. 
    7586     *                                Default empty string. 
    7687     * @return array|WP_Error A WP_Error on failure; an array with location and events on 
Note: See TracChangeset for help on using the changeset viewer.