Skip to content

Commit 8cd3fb9

Browse files
Docs: Fix wp_get_layout_style() parameter documentation.
* Changed `boolean` to `bool`. * Added `Optional.` and `Default` for each optional parameter. * Improved `@return` documentation to include empty string. Follow-up to [54274], [53421], [53085], [52069]. Props mukesh27, hellofromTonya. See #55646. git-svn-id: https://develop.svn.wordpress.org/trunk@54275 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 2d75ae2 commit 8cd3fb9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/wp-includes/block-supports/layout.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ function wp_register_layout_support( $block_type ) {
3939
* @param string $selector CSS selector.
4040
* @param array $layout Layout object. The one that is passed has already checked
4141
* the existence of default block layout.
42-
* @param boolean $has_block_gap_support Whether the theme has support for the block gap.
42+
* @param bool $has_block_gap_support Optional. Whether the theme has support for the block gap. Default false.
4343
* @param string|string[]|null $gap_value Optional. The block gap value to apply. Default null.
44-
* @param boolean $should_skip_gap_serialization Whether to skip applying the user-defined value set in the editor.
45-
* @param string $fallback_gap_value The block gap value to apply.
44+
* @param bool $should_skip_gap_serialization Optional. Whether to skip applying the user-defined value set in the editor. Default false.
45+
* @param string $fallback_gap_value Optional. The block gap value to apply. Default '0.5em'.
4646
* @param array|null $block_spacing Optional. Custom spacing set on the block. Default null.
47-
* @return string CSS style.
47+
* @return string CSS styles on success. Else, empty string.
4848
*/
4949
function wp_get_layout_style( $selector, $layout, $has_block_gap_support = false, $gap_value = null, $should_skip_gap_serialization = false, $fallback_gap_value = '0.5em', $block_spacing = null ) {
5050
$layout_type = isset( $layout['type'] ) ? $layout['type'] : 'default';

0 commit comments

Comments
 (0)