Make WordPress Core

Changeset 25302


Ignore:
Timestamp:
09/08/2013 10:03:14 PM (11 years ago)
Author:
SergeyBiryukov
Message:

Inline documentation for hooks in http.php.

props tw2113.
see #25229.

File:
1 edited

Legend:

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

    r24915 r25302  
    339339        $origin = $_SERVER[ 'HTTP_ORIGIN' ];
    340340
     341    /**
     342     * Change the origin of an HTTP request.
     343     *
     344     * @since 3.4.0
     345     *
     346     * @param string $origin The original origin for the request.
     347     */
    341348    return apply_filters( 'http_origin', $origin );
    342349}
    343350
    344351/**
    345  * Retrieve list of allowed http origins.
     352 * Retrieve list of allowed HTTP origins.
    346353 *
    347354 * @since 3.4.0
     
    361368    ) );
    362369
     370    /**
     371     * Change the origin types allowed for HTTP requests.
     372     *
     373     * @since 3.4.0
     374     *
     375     * @param array $allowed_origins {
     376     *     Default allowed HTTP origins.
     377     *     @type string Non-secure URL for admin origin.
     378     *     @type string Secure URL for admin origin.
     379     *     @type string Non-secure URL for home origin.
     380     *     @type string Secure URL for home origin.
     381     * }
     382     */
    363383    return apply_filters( 'allowed_http_origins' , $allowed_origins );
    364384}
    365385
    366386/**
    367  * Determines if the http origin is an authorized one.
     387 * Determines if the HTTP origin is an authorized one.
    368388 *
    369389 * @since 3.4.0
     
    381401        $origin = '';
    382402
     403    /**
     404     * Change the allowed HTTP origin result.
     405     *
     406     * @since 3.4.0
     407     *
     408     * @param string $origin Result of check for allowed origin.
     409     * @param string $origin_arg original origin string passed into is_allowed_http_origin function.
     410     */
    383411    return apply_filters( 'allowed_http_origin', $origin, $origin_arg );
    384412}
     
    459487            ) {
    460488                // If host appears local, reject unless specifically allowed.
     489                /**
     490                 * Check if HTTP request is external or not.
     491                 *
     492                 * Allows to change and allow external requests for the HTTP request.
     493                 *
     494                 * @since 3.6.0
     495                 *
     496                 * @param bool false Whether HTTP request is external or not.
     497                 * @param string $host IP of the requested host.
     498                 * @param string $url URL of the requested host.
     499                 */
    461500                if ( ! apply_filters( 'http_request_host_is_external', false, $host, $url ) )
    462501                    return false;
Note: See TracChangeset for help on using the changeset viewer.