Make WordPress Core

Changeset 58706 for trunk


Ignore:
Timestamp:
07/11/2024 06:22:51 AM (2 years ago)
Author:
SergeyBiryukov
Message:

Docs: Fix typos in various REST API DocBlocks and comments.

Follow-up to [34928], [43739], [46422], [50717], [51973], [54528].

Props antonvlasenko.
Fixes #61593.

Location:
trunk/src/wp-includes/rest-api
Files:
6 edited

Legend:

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

    r58682 r58706  
    166166         *
    167167         * Ensures that header names are always treated the same regardless of
    168          * source. Header names are always case insensitive.
     168         * source. Header names are always case-insensitive.
    169169         *
    170170         * Note that we treat `-` (dashes) and `_` (underscores) as the same
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php

    r58694 r58706  
    451451
    452452        /**
    453          * Performs post processing on an attachment.
     453         * Performs post-processing on an attachment.
    454454         *
    455455         * @since 5.3.0
     
    472472
    473473        /**
    474          * Checks if a given request can perform post processing on an attachment.
     474         * Checks if a given request can perform post-processing on an attachment.
    475475         *
    476476         * @since 5.3.0
     
    602602                        switch ( $modifier['type'] ) {
    603603                                case 'rotate':
    604                                         // Rotation direction: clockwise vs. counter clockwise.
     604                                        // Rotation direction: clockwise vs. counterclockwise.
    605605                                        $rotate = 0 - $args['angle'];
    606606
     
    662662                $filename = "{$image_name}.{$image_ext}";
    663663
    664                 // Create the uploads sub-directory if needed.
     664                // Create the uploads subdirectory if needed.
    665665                $uploads = wp_upload_dir();
    666666
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php

    r58326 r58706  
    184184         * @param bool    $required Whether the post requires a password check.
    185185         * @param WP_Post $post     The post been password checked.
    186          * @return bool Result of password check taking in to account REST API considerations.
     186         * @return bool Result of password check taking into account REST API considerations.
    187187         */
    188188        public function check_password_required( $required, $post ) {
     
    20522052         * By default, WordPress will show password protected posts with a title of
    20532053         * "Protected: %s", as the REST API communicates the protected status of a post
    2054          * in a machine readable format, we remove the "Protected: " prefix.
     2054         * in a machine-readable format, we remove the "Protected: " prefix.
    20552055         *
    20562056         * @since 4.7.0
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php

    r58704 r58706  
    165165                }
    166166
    167                 // Otherwise grant access if the post is readable by the logged in user.
     167                // Otherwise grant access if the post is readable by the logged-in user.
    168168                if ( current_user_can( 'read_post', $post->ID ) ) {
    169169                        return true;
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-url-details-controller.php

    r58704 r58706  
    348348         *
    349349         * @param array $meta_elements {
    350          *     A multi-dimensional indexed array on success, else empty array.
     350         *     A multidimensional indexed array on success, else empty array.
    351351         *
    352352         *     @type string[] $0 Meta elements with a content attribute.
     
    384384         *
    385385         * @param array  $meta_elements {
    386          *     A multi-dimensional indexed array on success, else empty array.
     386         *     A multidimensional indexed array on success, else empty array.
    387387         *
    388388         *     @type string[] $0 Meta elements with a content attribute.
     
    526526         * @param string $html The string of HTML to be parsed.
    527527         * @return array {
    528          *     A multi-dimensional indexed array on success, else empty array.
     528         *     A multidimensional indexed array on success, else empty array.
    529529         *
    530530         *     @type string[] $0 Meta elements with a content attribute.
     
    589589                                /*
    590590                                * These are the options:
    591                                 * - i : case insensitive
     591                                * - i : case-insensitive
    592592                                * - s : allows newline characters for the . match (needed for multiline elements)
    593593                                * - U means non-greedy matching
     
    638638                                /*
    639639                                 * These are the options:
    640                                  * - i : case insensitive
     640                                 * - i : case-insensitive
    641641                                 * - s : allows newline characters for the . match (needed for multiline elements)
    642642                                 * - U means non-greedy matching
  • trunk/src/wp-includes/rest-api/search/class-wp-rest-post-search-handler.php

    r57643 r58706  
    188188         * By default, WordPress will show password protected posts with a title of
    189189         * "Protected: %s". As the REST API communicates the protected status of a post
    190          * in a machine readable format, we remove the "Protected: " prefix.
     190         * in a machine-readable format, we remove the "Protected: " prefix.
    191191         *
    192192         * @since 5.0.0
Note: See TracChangeset for help on using the changeset viewer.