From 2eed880735c78dd98f18f718dd4e27c560f0b2f7 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Wed, 1 Dec 2021 23:14:22 +0000 Subject: [PATCH] Docs: Miscellaneous Docblock corrections in several `/block-supports` files. See #53399. git-svn-id: https://develop.svn.wordpress.org/trunk@52302 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/block-supports/align.php | 3 +-- src/wp-includes/block-supports/border.php | 5 ++--- src/wp-includes/block-supports/dimensions.php | 6 ++---- src/wp-includes/block-supports/layout.php | 9 ++++----- src/wp-includes/block-supports/spacing.php | 10 ++++------ src/wp-includes/block-supports/typography.php | 10 ++++------ 6 files changed, 17 insertions(+), 26 deletions(-) diff --git a/src/wp-includes/block-supports/align.php b/src/wp-includes/block-supports/align.php index ae0c2a4256..5a1e3a7e58 100644 --- a/src/wp-includes/block-supports/align.php +++ b/src/wp-includes/block-supports/align.php @@ -31,7 +31,7 @@ function wp_register_alignment_support( $block_type ) { } /** - * Add CSS classes for block alignment to the incoming attributes array. + * Adds CSS classes for block alignment to the incoming attributes array. * This will be applied to the block markup in the front-end. * * @since 5.6.0 @@ -39,7 +39,6 @@ function wp_register_alignment_support( $block_type ) { * * @param WP_Block_Type $block_type Block Type. * @param array $block_attributes Block attributes. - * * @return array Block alignment CSS classes and inline styles. */ function wp_apply_alignment_support( $block_type, $block_attributes ) { diff --git a/src/wp-includes/block-supports/border.php b/src/wp-includes/block-supports/border.php index ca213cd5dc..15fd36bbdc 100644 --- a/src/wp-includes/block-supports/border.php +++ b/src/wp-includes/block-supports/border.php @@ -47,7 +47,6 @@ function wp_register_border_support( $block_type ) { * * @param WP_Block_Type $block_type Block type. * @param array $block_attributes Block attributes. - * * @return array Border CSS classes and inline styles. */ function wp_apply_border_support( $block_type, $block_attributes ) { @@ -145,8 +144,8 @@ function wp_apply_border_support( $block_type, $block_attributes ) { * @access private * * @param WP_Block_Type $block_type Block type. - * - * @return bool + * @return bool Whether serialization of the current block's border properties + * should occur. */ function wp_skip_border_serialization( $block_type ) { $border_support = _wp_array_get( $block_type->supports, array( '__experimentalBorder' ), false ); diff --git a/src/wp-includes/block-supports/dimensions.php b/src/wp-includes/block-supports/dimensions.php index 73ecf51e0e..7e56c011e7 100644 --- a/src/wp-includes/block-supports/dimensions.php +++ b/src/wp-includes/block-supports/dimensions.php @@ -40,7 +40,7 @@ function wp_register_dimensions_support( $block_type ) { } /** - * Add CSS classes for block dimensions to the incoming attributes array. + * Adds CSS classes for block dimensions to the incoming attributes array. * This will be applied to the block markup in the front-end. * * @since 5.9.0 @@ -48,7 +48,6 @@ function wp_register_dimensions_support( $block_type ) { * * @param WP_Block_Type $block_type Block Type. * @param array $block_attributes Block attributes. - * * @return array Block dimensions CSS classes and inline styles. */ function wp_apply_dimensions_support( $block_type, $block_attributes ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable @@ -72,8 +71,7 @@ function wp_apply_dimensions_support( $block_type, $block_attributes ) { // phpc * @access private * * @param WP_Block_type $block_type Block type. - * - * @return boolean Whether to serialize spacing support styles & classes. + * @return bool Whether to serialize spacing support styles & classes. */ function wp_skip_dimensions_serialization( $block_type ) { $dimensions_support = _wp_array_get( $block_type->supports, array( '__experimentalDimensions' ), false ); diff --git a/src/wp-includes/block-supports/layout.php b/src/wp-includes/block-supports/layout.php index 5f1230f22e..7a114a4098 100644 --- a/src/wp-includes/block-supports/layout.php +++ b/src/wp-includes/block-supports/layout.php @@ -35,10 +35,10 @@ function wp_register_layout_support( $block_type ) { * @since 5.9.0 * @access private * - * @param string $selector CSS selector. - * @param array $layout Layout object. The one that is passed has already checked the existance of default block layout. - * @param boolean $has_block_gap_support Whether the theme has support for the block gap. - * + * @param string $selector CSS selector. + * @param array $layout Layout object. The one that is passed has already checked + * the existance of default block layout. + * @param bool $has_block_gap_support Whether the theme has support for the block gap. * @return string CSS style. */ function wp_get_layout_style( $selector, $layout, $has_block_gap_support = false ) { @@ -216,7 +216,6 @@ add_filter( 'render_block', 'wp_render_layout_support_flag', 10, 2 ); * * @param string $block_content Rendered block content. * @param array $block Block object. - * * @return string Filtered block content. */ function wp_restore_group_inner_container( $block_content, $block ) { diff --git a/src/wp-includes/block-supports/spacing.php b/src/wp-includes/block-supports/spacing.php index 8d93d4e1e9..86def2fa8e 100644 --- a/src/wp-includes/block-supports/spacing.php +++ b/src/wp-includes/block-supports/spacing.php @@ -41,7 +41,6 @@ function wp_register_spacing_support( $block_type ) { * * @param WP_Block_Type $block_type Block Type. * @param array $block_attributes Block attributes. - * * @return array Block spacing CSS classes and inline styles. */ function wp_apply_spacing_support( $block_type, $block_attributes ) { @@ -86,8 +85,7 @@ function wp_apply_spacing_support( $block_type, $block_attributes ) { * @access private * * @param WP_Block_Type $block_type Block type. - * - * @return boolean Whether to serialize spacing support styles & classes. + * @return bool Whether to serialize spacing support styles & classes. */ function wp_skip_spacing_serialization( $block_type ) { $spacing_support = _wp_array_get( $block_type->supports, array( 'spacing' ), false ); @@ -104,9 +102,9 @@ function wp_skip_spacing_serialization( $block_type ) { * @since 5.9.0 * @access private * - * @param string $block_content Rendered block content. - * @param array $block Block object. - * @return string Filtered block content. + * @param string $block_content Rendered block content. + * @param array $block Block object. + * @return string Filtered block content. */ function wp_render_spacing_gap_support( $block_content, $block ) { $block_type = WP_Block_Type_Registry::get_instance()->get_registered( $block['blockName'] ); diff --git a/src/wp-includes/block-supports/typography.php b/src/wp-includes/block-supports/typography.php index 82ee29af67..cf219dc493 100644 --- a/src/wp-includes/block-supports/typography.php +++ b/src/wp-includes/block-supports/typography.php @@ -60,16 +60,15 @@ function wp_register_typography_support( $block_type ) { } /** - * Add CSS classes and inline styles for typography features such as font sizes + * Adds CSS classes and inline styles for typography features such as font sizes * to the incoming attributes array. This will be applied to the block markup in * the front-end. * * @since 5.6.0 * @access private * - * @param WP_Block_Type $block_type Block type. - * @param array $block_attributes Block attributes. - * + * @param WP_Block_Type $block_type Block type. + * @param array $block_attributes Block attributes. * @return array Typography CSS classes and inline styles. */ function wp_apply_typography_support( $block_type, $block_attributes ) { @@ -192,8 +191,7 @@ function wp_apply_typography_support( $block_type, $block_attributes ) { * @param array $attributes Block's attributes. * @param string $feature Key for the feature within the typography styles. * @param string $css_property Slug for the CSS property the inline style sets. - * - * @return string CSS inline style. + * @return string CSS inline style. */ function wp_typography_get_css_variable_inline_style( $attributes, $feature, $css_property ) { // Retrieve current attribute value or skip if not found.