Make WordPress Core

Changeset 46424


Ignore:
Timestamp:
10/07/2019 07:06:41 PM (7 years ago)
Author:
johnbillion
Message:

Docs: Miscellaneous inline docs corrections and improvements.

See #47110

Location:
trunk/src/wp-includes
Files:
4 edited

Legend:

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

    r46232 r46424  
    134134         *                                             need to be separately decompressed. Default true.
    135135         *     @type bool         $sslverify           Whether to verify SSL for the request. Default true.
    136          *     @type string       sslcertificates      Absolute path to an SSL certificate .crt file.
     136         *     @type string       $sslcertificates     Absolute path to an SSL certificate .crt file.
    137137         *                                             Default ABSPATH . WPINC . '/certificates/ca-bundle.crt'.
    138138         *     @type bool         $stream              Whether to stream to a file. If set to true and no filename was
     
    216216                $args = wp_parse_args( $args );
    217217
    218                 // By default, Head requests do not cause redirections.
     218                // By default, HEAD requests do not cause redirections.
    219219                if ( isset( $args['method'] ) && 'HEAD' == $args['method'] ) {
    220220                        $defaults['redirection'] = 0;
     
    251251                 * @since 2.9.0
    252252                 *
    253                  * @param false|array|WP_Error $preempt Whether to preempt an HTTP request's return value. Default false.
    254                  * @param array                $parsed_args        HTTP request arguments.
    255                  * @param string               $url      The request URL.
     253                 * @param false|array|WP_Error $preempt     Whether to preempt an HTTP request's return value. Default false.
     254                 * @param array                $parsed_args HTTP request arguments.
     255                 * @param string               $url         The request URL.
    256256                 */
    257257                $pre = apply_filters( 'pre_http_request', false, $parsed_args, $url );
     
    410410                 * @since 2.8.0
    411411                 *
    412                  * @param array|WP_Error $response HTTP response or WP_Error object.
    413                  * @param string         $context  Context under which the hook is fired.
    414                  * @param string         $class    HTTP transport used.
    415                  * @param array          $parsed_args        HTTP request arguments.
    416                  * @param string         $url      The request URL.
     412                 * @param array|WP_Error $response    HTTP response or WP_Error object.
     413                 * @param string         $context     Context under which the hook is fired.
     414                 * @param string         $class       HTTP transport used.
     415                 * @param array          $parsed_args HTTP request arguments.
     416                 * @param string         $url         The request URL.
    417417                 */
    418418                do_action( 'http_api_debug', $response, 'response', 'Requests', $parsed_args, $url );
     
    439439                 * @since 2.9.0
    440440                 *
    441                  * @param array  $response HTTP response.
    442                  * @param array  $parsed_args        HTTP request arguments.
    443                  * @param string $url      The request URL.
     441                 * @param array  $response    HTTP response.
     442                 * @param array  $parsed_args HTTP request arguments.
     443                 * @param string $url         The request URL.
    444444                 */
    445445                return apply_filters( 'http_response', $response, $parsed_args, $url );
     
    891891                        return ! preg_match( $wildcard_regex, $check['host'] );
    892892                } else {
    893                         return ! in_array( $check['host'], $accessible_hosts ); //Inverse logic, If it's in the array, then we can't access it.
     893                        return ! in_array( $check['host'], $accessible_hosts ); // Inverse logic, if it's in the array, then don't block it.
    894894                }
    895895
     
    990990
    991991        /**
    992          * Handles HTTP Redirects and follows them if appropriate.
     992         * Handles an HTTP redirect and follows it if appropriate.
    993993         *
    994994         * @since 3.7.0
  • trunk/src/wp-includes/class-wp-http-requests-response.php

    r45135 r46424  
    6060         *
    6161         * @since 4.6.0
    62          *
    63          * @see \Requests_Utility_CaseInsensitiveDictionary
    6462         *
    6563         * @return \Requests_Utility_CaseInsensitiveDictionary Map of header name to header value.
  • trunk/src/wp-includes/http.php

    r45611 r46424  
    155155
    156156/**
    157  * Retrieve the raw response from the HTTP request using the GET method.
     157 * Performs an HTTP request using the GET method and returns its response.
    158158 *
    159159 * @since 2.7.0
     
    172172
    173173/**
    174  * Retrieve the raw response from the HTTP request using the POST method.
     174 * Performs an HTTP request using the POST method and returns its response.
    175175 *
    176176 * @since 2.7.0
     
    189189
    190190/**
    191  * Retrieve the raw response from the HTTP request using the HEAD method.
     191 * Performs an HTTP request using the HEAD method and returns its response.
    192192 *
    193193 * @since 2.7.0
     
    418418 * @since 3.4.0
    419419 *
    420  * @return array Array of origin URLs.
     420 * @return string[] Array of origin URLs.
    421421 */
    422422function get_allowed_http_origins() {
     
    439439         * @since 3.4.0
    440440         *
    441          * @param array $allowed_origins {
    442          *     Default allowed HTTP origins.
    443          *     @type string Non-secure URL for admin origin.
    444          *     @type string Secure URL for admin origin.
    445          *     @type string Non-secure URL for home origin.
    446          *     @type string Secure URL for home origin.
     441         * @param string[] $allowed_origins {
     442         *     Array of default allowed HTTP origins.
     443         *
     444         *     @type string $0 Non-secure URL for admin origin.
     445         *     @type string $1 Secure URL for admin origin.
     446         *     @type string $2 Non-secure URL for home origin.
     447         *     @type string $3 Secure URL for home origin.
    447448         * }
    448449         */
     
    518519 * @since 3.5.2
    519520 *
    520  * @param string $url
     521 * @param string $url Request URL.
    521522 * @return false|string URL or false on failure.
    522523 */
     
    573574                                 * @since 3.6.0
    574575                                 *
    575                                  * @param bool   false Whether HTTP request is external or not.
    576                                  * @param string $host IP of the requested host.
    577                                  * @param string $url  URL of the requested host.
     576                                 * @param bool   $external Whether HTTP request is external or not.
     577                                 * @param string $host     Host name of the requested URL.
     578                                 * @param string $url      Requested URL.
    578579                                 */
    579580                                if ( ! apply_filters( 'http_request_host_is_external', false, $host, $url ) ) {
     
    716717 *
    717718 * @param array|false $url_parts The parsed URL. Can be false if the URL failed to parse.
    718  * @param int    $component The specific component to retrieve. Use one of the PHP
    719  *                          predefined constants to specify which one.
    720  *                          Defaults to -1 (= return all parts as an array).
     719 * @param int         $component The specific component to retrieve. Use one of the PHP
     720 *                               predefined constants to specify which one.
     721 *                               Defaults to -1 (= return all parts as an array).
    721722 * @return mixed False on parse failure; Array of URL components on success;
    722723 *               When a specific component has been requested: null if the component
     
    748749 *
    749750 * @param int $constant PHP_URL_* constant.
    750  * @return string|bool The named key or false.
     751 * @return string|false The named key or false.
    751752 */
    752753function _wp_translate_php_url_constant_to_key( $constant ) {
  • trunk/src/wp-includes/taxonomy.php

    r46232 r46424  
    33063306
    33073307/**
    3308  * Retrieves the taxonomy relationship to the term object id.
     3308 * Retrieves the cached term objects for the given object ID.
    33093309 *
    33103310 * Upstream functions (like get_the_terms() and is_object_in_term()) are
     
    33133313 *
    33143314 * @since 2.3.0
    3315  * @since 4.7.0 Returns a `WP_Error` object if `get_term()` returns an error for
     3315 * @since 4.7.0 Returns a `WP_Error` object if there's an error with
    33163316 *              any of the matched terms.
    33173317 *
    3318  * @param int    $id       Term object ID.
     3318 * @param int    $id       Term object ID, for example a post, comment, or user ID.
    33193319 * @param string $taxonomy Taxonomy name.
    3320  * @return bool|array|WP_Error Array of `WP_Term` objects, if cached.
    3321  *                             False if cache is empty for `$taxonomy` and `$id`.
    3322  *                             WP_Error if get_term() returns an error object for any term.
     3320 * @return bool|WP_Term[]|WP_Error Array of `WP_Term` objects, if cached.
     3321 *                                 False if cache is empty for `$taxonomy` and `$id`.
     3322 *                                 WP_Error if get_term() returns an error object for any term.
    33233323 */
    33243324function get_object_term_cache( $id, $taxonomy ) {
Note: See TracChangeset for help on using the changeset viewer.