wp_get_layout_style
- %1$s is private and should not be used in themes or plugins directly.
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 )
Access:Parameters:- (string) selector CSS selector.
- (array) layout Layout object. The one that is passed has already checked the existence of default block layout.
- (bool) has_block_gap_support Optional. Whether the theme has support for the block gap. Default false.
- (string|string[]|null) gap_value Optional. The block gap value to apply. Default null.
- (bool) should_skip_gap_serialization Optional. Whether to skip applying the user-defined value set in the editor. Default false.
- (string) fallback_gap_value Optional. The block gap value to apply. Default '0.5em'.
- (array|null) block_spacing Optional. Custom spacing set on the block. Default null.
Returns:- (string) CSS styles on success. Else, empty string.
Defined at:Change Log: - Introduced in WordPress: 5.9.0
- Deprecated in WordPress: —
Description
Generates the CSS corresponding to the provided layout.