From cd9aade1bdb61c020cde5781bd9cdcd486366898 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Fri, 29 Apr 2022 19:24:09 +0000 Subject: [PATCH] Docs: Formatting corrections for various docblocks. See #54729 Built from https://develop.svn.wordpress.org/trunk@53317 git-svn-id: http://core.svn.wordpress.org/trunk@52906 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-image-editor-gd.php | 2 +- wp-includes/class-wp-image-editor-imagick.php | 2 +- wp-includes/class-wp-image-editor.php | 2 +- wp-includes/functions.php | 4 +-- wp-includes/option.php | 35 ++++++++++--------- .../class-wp-rest-url-details-controller.php | 24 ++++++------- wp-includes/version.php | 2 +- 7 files changed, 36 insertions(+), 35 deletions(-) diff --git a/wp-includes/class-wp-image-editor-gd.php b/wp-includes/class-wp-image-editor-gd.php index a6dcf1ca12..0d2965d925 100644 --- a/wp-includes/class-wp-image-editor-gd.php +++ b/wp-includes/class-wp-image-editor-gd.php @@ -233,7 +233,7 @@ class WP_Image_Editor_GD extends WP_Image_Editor { * If one of the two is set to null, the resize will * maintain aspect ratio according to the source image. * - * @type array $size { + * @type array ...$0 { * Array of height, width values, and whether to crop. * * @type int $width Image width. Optional if `$height` is specified. diff --git a/wp-includes/class-wp-image-editor-imagick.php b/wp-includes/class-wp-image-editor-imagick.php index 7301c9b710..88614fe1ae 100644 --- a/wp-includes/class-wp-image-editor-imagick.php +++ b/wp-includes/class-wp-image-editor-imagick.php @@ -444,7 +444,7 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor { * If one of the two is set to null, the resize will * maintain aspect ratio according to the provided dimension. * - * @type array $size { + * @type array ...$0 { * Array of height, width values, and whether to crop. * * @type int $width Image width. Optional if `$height` is specified. diff --git a/wp-includes/class-wp-image-editor.php b/wp-includes/class-wp-image-editor.php index 649d021b55..b64ae0be7f 100644 --- a/wp-includes/class-wp-image-editor.php +++ b/wp-includes/class-wp-image-editor.php @@ -109,7 +109,7 @@ abstract class WP_Image_Editor { * @param array $sizes { * An array of image size arrays. Default sizes are 'small', 'medium', 'large'. * - * @type array $size { + * @type array ...$0 { * @type int $width Image width. * @type int $height Image height. * @type bool $crop Optional. Whether to crop the image. Default false. diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 579c2f0851..88d210bbd2 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -4515,8 +4515,8 @@ function wp_check_jsonp_callback( $callback ) { * @param array $options { * Optional. Options to be used with `json_decode()`. * - * @type bool associative Optional. When `true`, JSON objects will be returned as associative arrays. - * When `false`, JSON objects will be returned as objects. + * @type bool $associative Optional. When `true`, JSON objects will be returned as associative arrays. + * When `false`, JSON objects will be returned as objects. * } * * @return mixed Returns the value encoded in JSON in appropriate PHP type. diff --git a/wp-includes/option.php b/wp-includes/option.php index f8d6703a98..a65326f0a6 100644 --- a/wp-includes/option.php +++ b/wp-includes/option.php @@ -28,10 +28,11 @@ * as string equivalents. * * Exceptions: + * * 1. When the option has not been saved in the database, the `$default` value * is returned if provided. If not, boolean `false` is returned. - * 2. When one of the Options API filters is used: {@see 'pre_option_{$option}'}, - * {@see 'default_option_{$option}'}, or {@see 'option_{$option}'}, the returned + * 2. When one of the Options API filters is used: {@see 'pre_option_$option'}, + * {@see 'default_option_$option'}, or {@see 'option_$option'}, the returned * value may not match the expected type. * 3. When the option has just been saved in the database, and get_option() * is used right after, non-string scalar and null values are not converted to @@ -39,28 +40,28 @@ * * Examples: * - * When adding options like this: `add_option( 'my_option_name', 'value' );` - * and then retrieving them with `get_option( 'my_option_name' );`, the returned + * When adding options like this: `add_option( 'my_option_name', 'value' )` + * and then retrieving them with `get_option( 'my_option_name' )`, the returned * values will be: * - * `false` returns `string(0) ""` - * `true` returns `string(1) "1"` - * `0` returns `string(1) "0"` - * `1` returns `string(1) "1"` - * `'0'` returns `string(1) "0"` - * `'1'` returns `string(1) "1"` - * `null` returns `string(0) ""` + * - `false` returns `string(0) ""` + * - `true` returns `string(1) "1"` + * - `0` returns `string(1) "0"` + * - `1` returns `string(1) "1"` + * - `'0'` returns `string(1) "0"` + * - `'1'` returns `string(1) "1"` + * - `null` returns `string(0) ""` * * When adding options with non-scalar values like - * `add_option( 'my_array', array( false, 'str', null ) );`, the returned value + * `add_option( 'my_array', array( false, 'str', null ) )`, the returned value * will be identical to the original as it is serialized before saving * it in the database: * - * array(3) { - * [0] => bool(false) - * [1] => string(3) "str" - * [2] => NULL - * } + * array(3) { + * [0] => bool(false) + * [1] => string(3) "str" + * [2] => NULL + * } * * @since 1.5.0 * diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-url-details-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-url-details-controller.php index 4a87e4f695..b7d58faefa 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-url-details-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-url-details-controller.php @@ -349,9 +349,9 @@ class WP_REST_URL_Details_Controller extends WP_REST_Controller { * @param array $meta_elements { * A multi-dimensional indexed array on success, else empty array. * - * @type string[] 0 Meta elements with a content attribute. - * @type string[] 1 Content attribute's opening quotation mark. - * @type string[] 2 Content attribute's value for each meta element. + * @type string[] $0 Meta elements with a content attribute. + * @type string[] $1 Content attribute's opening quotation mark. + * @type string[] $2 Content attribute's value for each meta element. * } * @return string The meta description contents on success. Empty string if not found. */ @@ -385,9 +385,9 @@ class WP_REST_URL_Details_Controller extends WP_REST_Controller { * @param array $meta_elements { * A multi-dimensional indexed array on success, else empty array. * - * @type string[] 0 Meta elements with a content attribute. - * @type string[] 1 Content attribute's opening quotation mark. - * @type string[] 2 Content attribute's value for each meta element. + * @type string[] $0 Meta elements with a content attribute. + * @type string[] $1 Content attribute's opening quotation mark. + * @type string[] $2 Content attribute's value for each meta element. * } * @param string $url The target website URL. * @return string The OG image on success. Empty string if not found. @@ -527,9 +527,9 @@ class WP_REST_URL_Details_Controller extends WP_REST_Controller { * @return array { * A multi-dimensional indexed array on success, else empty array. * - * @type string[] 0 Meta elements with a content attribute. - * @type string[] 1 Content attribute's opening quotation mark. - * @type string[] 2 Content attribute's value for each meta element. + * @type string[] $0 Meta elements with a content attribute. + * @type string[] $1 Content attribute's opening quotation mark. + * @type string[] $2 Content attribute's value for each meta element. * } */ private function get_meta_with_content_elements( $html ) { @@ -607,9 +607,9 @@ class WP_REST_URL_Details_Controller extends WP_REST_Controller { * @param array $meta_elements { * A multi-dimensional indexed array on success, else empty array. * - * @type string[] 0 Meta elements with a content attribute. - * @type string[] 1 Content attribute's opening quotation mark. - * @type string[] 2 Content attribute's value for each meta element. + * @type string[] $0 Meta elements with a content attribute. + * @type string[] $1 Content attribute's opening quotation mark. + * @type string[] $2 Content attribute's value for each meta element. * } * @param string $attr Attribute that identifies the element with the target metadata. * @param string $attr_value The attribute's value that identifies the element with the target metadata. diff --git a/wp-includes/version.php b/wp-includes/version.php index c89f016387..3d6fd6cd49 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-beta3-53316'; +$wp_version = '6.0-beta3-53317'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.