Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/class-wp-rest-request.php

    r47088 r47122  
    447447        $params = array();
    448448        foreach ( $order as $type ) {
    449             // array_merge / the "+" operator will mess up
     449            // array_merge() / the "+" operator will mess up
    450450            // numeric keys, so instead do a manual foreach.
    451451            foreach ( (array) $this->params[ $type ] as $key => $value ) {
     
    675675
    676676        $this->params['JSON'] = $params;
     677
    677678        return true;
    678679    }
     
    784785                continue;
    785786            }
     787
    786788            foreach ( $this->params[ $type ] as $key => $value ) {
    787789                if ( ! isset( $attributes['args'][ $key ] ) ) {
    788790                    continue;
    789791                }
     792
    790793                $param_args = $attributes['args'][ $key ];
    791794
     
    989992            $route        = parse_url( $api_url_part, PHP_URL_PATH );
    990993        } elseif ( ! empty( $query_params['rest_route'] ) ) {
    991             // ?rest_route=... set directly
     994            // ?rest_route=... set directly.
    992995            $route = $query_params['rest_route'];
    993996            unset( $query_params['rest_route'] );
Note: See TracChangeset for help on using the changeset viewer.