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
This commit is contained in:
John Blackbourn 2022-04-29 19:24:09 +00:00
parent beac9601fa
commit cd9aade1bd
7 changed files with 36 additions and 35 deletions

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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
*

View File

@ -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.

View File

@ -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.