Docs: Miscellaneous DocBlock corrections.

See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48198 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-06-28 11:51:29 +00:00
parent 6361798918
commit 8672d08404
6 changed files with 10 additions and 10 deletions

View File

@ -2154,7 +2154,7 @@ class WP_Site_Health {
*
* Returns a boolean value of `true` if a scheduled task has been missed and ends processing.
*
* If the list of crons is an instance of WP_Error, return the instance instead of a boolean value.
* If the list of crons is an instance of WP_Error, returns the instance instead of a boolean value.
*
* @since 5.2.0
*
@ -2180,7 +2180,7 @@ class WP_Site_Health {
*
* Returns a boolean value of `true` if a scheduled task is late and ends processing.
*
* If the list of crons is an instance of WP_Error, return the instance instead of a boolean value.
* If the list of crons is an instance of WP_Error, returns the instance instead of a boolean value.
*
* @since 5.3.0
*

View File

@ -34,7 +34,7 @@ final class WP_Block_Styles_Registry {
*
* @since 5.3.0
*
* @param string $block_name Block ty name including namespace.
* @param string $block_name Block type name including namespace.
* @param array $style_properties Array containing the properties of the style name, label,
* style (name of the stylesheet to be enqueued),
* inline_style (string containing the CSS to be added).

View File

@ -2146,7 +2146,7 @@ function safecss_filter_attr( $css, $deprecated = '' ) {
* @since 4.6.0 Added support for `list-style-type`.
* @since 5.0.0 Added support for `background-image`.
* @since 5.1.0 Added support for `text-transform`.
* @since 5.2.0 Added support for `background-position` and `grid-template-columns`
* @since 5.2.0 Added support for `background-position` and `grid-template-columns`.
* @since 5.3.0 Added support for `grid`, `flex` and `column` layout properties.
* Extend `background-*` support of individual properties.
* @since 5.3.1 Added support for gradient backgrounds.
@ -2262,9 +2262,9 @@ function safecss_filter_attr( $css, $deprecated = '' ) {
'cursor',
'direction',
'float',
'list-style-type',
'overflow',
'vertical-align',
'list-style-type',
)
);

View File

@ -1723,8 +1723,7 @@ function wp_img_tag_add_loading_attr( $image, $context ) {
$value = 'lazy';
}
// Images should have dimension attributes for the `loading` attribute
// to be added.
// Images should have dimension attributes for the `loading` attribute to be added.
if ( false === strpos( $image, ' width=' ) || false === strpos( $image, ' height=' ) ) {
return $image;
}

View File

@ -1297,12 +1297,12 @@ function rest_validate_value_from_schema( $value, $args, $param = '' ) {
}
if ( isset( $args['minItems'] ) && count( $value ) < $args['minItems'] ) {
/* translators: 1: Parameter, 2: number. */
/* translators: 1: Parameter, 2: Number. */
return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s must contain at least %2$s items.' ), $param, number_format_i18n( $args['minItems'] ) ) );
}
if ( isset( $args['maxItems'] ) && count( $value ) > $args['maxItems'] ) {
/* translators: 1: Parameter, 2: number. */
/* translators: 1: Parameter, 2: Number. */
return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s must contain at most %2$s items.' ), $param, number_format_i18n( $args['maxItems'] ) ) );
}
}

View File

@ -605,7 +605,8 @@ class WP_REST_Server {
$embedded = array();
foreach ( $data['_links'] as $rel => $links ) {
// If a list of relations was specified, and the link relation is not in the list of allowed relations, don't process the link.
// If a list of relations was specified, and the link relation
// is not in the list of allowed relations, don't process the link.
if ( is_array( $embed ) && ! in_array( $rel, $embed, true ) ) {
continue;
}