Make WordPress Core

Changeset 53317


Ignore:
Timestamp:
04/29/2022 07:22:56 PM (3 years ago)
Author:
johnbillion
Message:

Docs: Formatting corrections for various docblocks.

See #54729

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

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-image-editor-gd.php

    r53270 r53317  
    234234     *     maintain aspect ratio according to the source image.
    235235     *
    236      *     @type array $size {
     236     *     @type array ...$0 {
    237237     *         Array of height, width values, and whether to crop.
    238238     *
  • trunk/src/wp-includes/class-wp-image-editor-imagick.php

    r52978 r53317  
    445445     *     maintain aspect ratio according to the provided dimension.
    446446     *
    447      *     @type array $size {
     447     *     @type array ...$0 {
    448448     *         Array of height, width values, and whether to crop.
    449449     *
  • trunk/src/wp-includes/class-wp-image-editor.php

    r53271 r53317  
    110110     *     An array of image size arrays. Default sizes are 'small', 'medium', 'large'.
    111111     *
    112      *     @type array $size {
     112     *     @type array ...$0 {
    113113     *         @type int  $width  Image width.
    114114     *         @type int  $height Image height.
  • trunk/src/wp-includes/functions.php

    r53299 r53317  
    45164516 *     Optional. Options to be used with `json_decode()`.
    45174517 *
    4518  *     @type bool associative Optional. When `true`, JSON objects will be returned as associative arrays.
    4519  *                            When `false`, JSON objects will be returned as objects.
     4518 *     @type bool $associative Optional. When `true`, JSON objects will be returned as associative arrays.
     4519 *                             When `false`, JSON objects will be returned as objects.
    45204520 * }
    45214521 *
  • trunk/src/wp-includes/option.php

    r52707 r53317  
    2929 *
    3030 * Exceptions:
     31 *
    3132 * 1. When the option has not been saved in the database, the `$default` value
    3233 *    is returned if provided. If not, boolean `false` is returned.
    33  * 2. When one of the Options API filters is used: {@see 'pre_option_{$option}'},
    34  *    {@see 'default_option_{$option}'}, or {@see 'option_{$option}'}, the returned
     34 * 2. When one of the Options API filters is used: {@see 'pre_option_$option'},
     35 *    {@see 'default_option_$option'}, or {@see 'option_$option'}, the returned
    3536 *    value may not match the expected type.
    3637 * 3. When the option has just been saved in the database, and get_option()
     
    4041 * Examples:
    4142 *
    42  * When adding options like this: `add_option( 'my_option_name', 'value' );`
    43  * and then retrieving them with `get_option( 'my_option_name' );`, the returned
     43 * When adding options like this: `add_option( 'my_option_name', 'value' )`
     44 * and then retrieving them with `get_option( 'my_option_name' )`, the returned
    4445 * values will be:
    4546 *
    46  * `false` returns `string(0) ""`
    47  * `true`  returns `string(1) "1"`
    48  * `0`     returns `string(1) "0"`
    49  * `1`     returns `string(1) "1"`
    50  * `'0'`   returns `string(1) "0"`
    51  * `'1'`   returns `string(1) "1"`
    52  * `null`  returns `string(0) ""`
     47 *   - `false` returns `string(0) ""`
     48 *   - `true`  returns `string(1) "1"`
     49 *   - `0`     returns `string(1) "0"`
     50 *   - `1`     returns `string(1) "1"`
     51 *   - `'0'`   returns `string(1) "0"`
     52 *   - `'1'`   returns `string(1) "1"`
     53 *   - `null`  returns `string(0) ""`
    5354 *
    5455 * When adding options with non-scalar values like
    55  * `add_option( 'my_array', array( false, 'str', null ) );`, the returned value
     56 * `add_option( 'my_array', array( false, 'str', null ) )`, the returned value
    5657 * will be identical to the original as it is serialized before saving
    5758 * it in the database:
    5859 *
    59  *    array(3) {
    60  *        [0] => bool(false)
    61  *        [1] => string(3) "str"
    62  *        [2] => NULL
    63  *    }
     60 *     array(3) {
     61 *         [0] => bool(false)
     62 *         [1] => string(3) "str"
     63 *         [2] => NULL
     64 *     }
    6465 *
    6566 * @since 1.5.0
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-url-details-controller.php

    r53053 r53317  
    350350     *     A multi-dimensional indexed array on success, else empty array.
    351351     *
    352      *     @type string[] 0 Meta elements with a content attribute.
    353      *     @type string[] 1 Content attribute's opening quotation mark.
    354      *     @type string[] 2 Content attribute's value for each meta element.
     352     *     @type string[] $0 Meta elements with a content attribute.
     353     *     @type string[] $1 Content attribute's opening quotation mark.
     354     *     @type string[] $2 Content attribute's value for each meta element.
    355355     * }
    356356     * @return string The meta description contents on success. Empty string if not found.
     
    386386     *     A multi-dimensional indexed array on success, else empty array.
    387387     *
    388      *     @type string[] 0 Meta elements with a content attribute.
    389      *     @type string[] 1 Content attribute's opening quotation mark.
    390      *     @type string[] 2 Content attribute's value for each meta element.
     388     *     @type string[] $0 Meta elements with a content attribute.
     389     *     @type string[] $1 Content attribute's opening quotation mark.
     390     *     @type string[] $2 Content attribute's value for each meta element.
    391391     * }
    392392     * @param string $url The target website URL.
     
    528528     *     A multi-dimensional indexed array on success, else empty array.
    529529     *
    530      *     @type string[] 0 Meta elements with a content attribute.
    531      *     @type string[] 1 Content attribute's opening quotation mark.
    532      *     @type string[] 2 Content attribute's value for each meta element.
     530     *     @type string[] $0 Meta elements with a content attribute.
     531     *     @type string[] $1 Content attribute's opening quotation mark.
     532     *     @type string[] $2 Content attribute's value for each meta element.
    533533     * }
    534534     */
     
    608608     *     A multi-dimensional indexed array on success, else empty array.
    609609     *
    610      *     @type string[] 0 Meta elements with a content attribute.
    611      *     @type string[] 1 Content attribute's opening quotation mark.
    612      *     @type string[] 2 Content attribute's value for each meta element.
     610     *     @type string[] $0 Meta elements with a content attribute.
     611     *     @type string[] $1 Content attribute's opening quotation mark.
     612     *     @type string[] $2 Content attribute's value for each meta element.
    613613     * }
    614614     * @param string $attr       Attribute that identifies the element with the target metadata.
Note: See TracChangeset for help on using the changeset viewer.