Make WordPress Core


Ignore:
Timestamp:
10/12/2019 06:03:22 PM (6 years ago)
Author:
johnbillion
Message:

Docs: Fix and improve inline documentation for the HTTP API.

See #47110

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-http.php

    r46424 r46468  
    823823
    824824    /**
    825      * Block requests through the proxy.
     825     * Determines whether an HTTP API request to the given URL should be blocked.
    826826     *
    827827     * Those who are behind a proxy and want to prevent access to certain hosts may do so. This will
    828      * prevent plugins from working and core functionality, if you don't include api.wordpress.org.
    829      *
    830      * You block external URL requests by defining WP_HTTP_BLOCK_EXTERNAL as true in your wp-config.php
     828     * prevent plugins from working and core functionality, if you don't include `api.wordpress.org`.
     829     *
     830     * You block external URL requests by defining `WP_HTTP_BLOCK_EXTERNAL` as true in your `wp-config.php`
    831831     * file and this will only allow localhost and your site to make requests. The constant
    832      * WP_ACCESSIBLE_HOSTS will allow additional hosts to go through for requests. The format of the
    833      * WP_ACCESSIBLE_HOSTS constant is a comma separated list of hostnames to allow, wildcard domains
    834      * are supported, eg *.wordpress.org will allow for all subdomains of wordpress.org to be contacted.
     832     * `WP_ACCESSIBLE_HOSTS` will allow additional hosts to go through for requests. The format of the
     833     * `WP_ACCESSIBLE_HOSTS` constant is a comma separated list of hostnames to allow, wildcard domains
     834     * are supported, eg `*.wordpress.org` will allow for all subdomains of `wordpress.org` to be contacted.
    835835     *
    836836     * @since 2.8.0
     
    860860        if ( 'localhost' == $check['host'] || ( isset( $home['host'] ) && $home['host'] == $check['host'] ) ) {
    861861            /**
    862              * Filters whether to block local requests through the proxy.
     862             * Filters whether to block local HTTP API requests.
     863             *
     864             * A local request is one to `localhost` or to the same host as the site itself.
    863865             *
    864866             * @since 2.8.0
    865867             *
    866              * @param bool $block Whether to block local requests through proxy.
    867              *                    Default false.
     868             * @param bool $block Whether to block local requests. Default false.
    868869             */
    869870            return apply_filters( 'block_local_requests', false );
     
    994995     * @since 3.7.0
    995996     *
    996      * @param string $url The URL which was requested.
    997      * @param array $args The Arguments which were used to make the request.
    998      * @param array $response The Response of the HTTP request.
    999      * @return false|object False if no redirect is present, a WP_HTTP or WP_Error result otherwise.
     997     * @param string $url      The URL which was requested.
     998     * @param array  $args     The arguments which were used to make the request.
     999     * @param array  $response The response of the HTTP request.
     1000     * @return false|WP_Error|array False if no redirect is present, a WP_Error object if there's an error, or an HTTP
     1001     *                              API response array if the redirect is successfully followed.
    10001002     */
    10011003    public static function handle_redirects( $url, $args, $response ) {
Note: See TracChangeset for help on using the changeset viewer.