WordPress.org

Make WordPress Core

Changeset 52242


Ignore:
Timestamp:
11/24/2021 11:58:20 PM (2 weeks ago)
Author:
SergeyBiryukov
Message:

Docs: Miscellaneous DocBlock corrections.

See #53399.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/media/views/modal.js

    r51945 r52242  
    139139        $( 'body' ).removeClass( 'modal-open' );
    140140
    141         // Hide the modal element by adding display none.
     141        // Hide the modal element by adding display:none.
    142142        this.$el.hide();
    143143
  • trunk/src/wp-admin/includes/file.php

    r52032 r52242  
    11951195        }
    11961196
    1197         // Potential file name must be valid string
    1198         if ( $tmpfname_disposition && is_string( $tmpfname_disposition ) && ( 0 === validate_file( $tmpfname_disposition ) ) ) {
     1197        // Potential file name must be valid string.
     1198        if ( $tmpfname_disposition && is_string( $tmpfname_disposition )
     1199            && ( 0 === validate_file( $tmpfname_disposition ) )
     1200        ) {
    11991201            if ( rename( $tmpfname, $tmpfname_disposition ) ) {
    12001202                $tmpfname = $tmpfname_disposition;
  • trunk/src/wp-includes/rest-api.php

    r52133 r52242  
    30573057 *
    30583058 * @param int|WP_Post $post Post ID or post object.
    3059  * @return string The route path with a leading slash for the given post, or an empty string if there is not a route.
     3059 * @return string The route path with a leading slash for the given post,
     3060 *                or an empty string if there is not a route.
    30603061 */
    30613062function rest_get_route_for_post( $post ) {
     
    30903091 *
    30913092 * @param string $post_type The name of a registered post type.
    3092  * @return string The route path with a leading slash for the given post type, or an empty string if there is not a route.
     3093 * @return string The route path with a leading slash for the given post type,
     3094 *                or an empty string if there is not a route.
    30933095 */
    30943096function rest_get_route_for_post_type_items( $post_type ) {
     
    31233125 *
    31243126 * @param int|WP_Term $term Term ID or term object.
    3125  * @return string The route path with a leading slash for the given term, or an empty string if there is not a route.
     3127 * @return string The route path with a leading slash for the given term,
     3128 *                or an empty string if there is not a route.
    31263129 */
    31273130function rest_get_route_for_term( $term ) {
  • trunk/tests/phpunit/includes/mock-invokable.php

    r52235 r52242  
    1010 * Class Mock_Invokable.
    1111 *
    12  * This class is using to mock a class that has __invoke method.
     12 * This class is used to mock a class that has an `__invoke` method.
    1313 */
    1414class Mock_Invokable {
  • trunk/tests/phpunit/includes/spy-rest-server.php

    r51960 r52242  
    4040
    4141    /**
    42      * Stores last set status.
    43      * @param int $code HTTP status.
    44      */
    45     public function set_status( $status ) {
    46         $this->status = $status;
    47     }
    48 
    49     /**
    5042     * Removes a header from the list of sent headers.
    5143     *
     
    5446    public function remove_header( $header ) {
    5547        unset( $this->sent_headers[ $header ] );
     48    }
     49
     50    /**
     51     * Stores last set status.
     52     *
     53     * @param int $code HTTP status.
     54     */
     55    public function set_status( $status ) {
     56        $this->status = $status;
    5657    }
    5758
  • trunk/tests/phpunit/tests/admin/includesFile.php

    r52010 r52242  
    8989     * @covers ::download_url
    9090     *
    91      * @param $filter  A callback containing a fake Content-Disposition header.
     91     * @param $filter A callback containing a fake Content-Disposition header.
    9292     */
    9393    public function test_download_url_should_respect_filename_from_content_disposition_header( $filter ) {
     
    175175     * @covers ::download_url
    176176     *
    177      * @param $filter  A callback containing a fake Content-Disposition header.
     177     * @param $filter A callback containing a fake Content-Disposition header.
    178178     */
    179179    public function test_download_url_should_reject_filename_from_invalid_content_disposition_header( $filter ) {
Note: See TracChangeset for help on using the changeset viewer.