| [ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
Layout block support flag.
| File Size: | 1567 lines (60 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
| wp_get_block_style_variation_name_from_registered_style( string $class_name, array $registered_styles = array() X-Ref |
| Gets the first style variation name from a className string that matches a registered style. return: string|null The name of the first registered variation, or null if none found. param: string $class_name CSS class string for a block. param: array<string, array<string, mixed>> $registered_styles Currently registered block styles. |
| wp_get_layout_child_values( $layout ) X-Ref |
| Returns the child-layout-only subset of a layout object. return: array Child layout values, or an empty array. param: mixed $layout Layout object. |
| wp_get_layout_container_values( $layout ) X-Ref |
| Returns the container-layout subset of a layout object. return: array Container layout values, or an empty array. param: mixed $layout Layout object. |
| wp_sanitize_block_gap_value( $gap_value ) X-Ref |
| Sanitizes a block gap value before layout style generation. return: string|array|null Sanitized block gap value. param: string|array|null $gap_value Block gap value. |
| wp_get_child_layout_style_rules( $selector, $child_layout, $parent_layout = array() X-Ref |
| Returns child layout styles for a block affected by its parent's layout. return: array Child layout style rules. param: string $selector CSS selector. param: array $child_layout Child layout values. param: array $parent_layout Parent layout values. param: array|null $viewport_overrides Optional. Child viewport layout overrides to emit. |
| wp_get_layout_definitions() X-Ref |
| Returns layout definitions, keyed by layout type. Provides a common definition of slugs, classnames, base styles, and spacing styles for each layout type. When making changes or additions to layout definitions, the corresponding JavaScript definitions should also be updated. return: array[] Layout definitions. |
| wp_register_layout_support( $block_type ) X-Ref |
| Registers the layout block attribute for block types that support it. param: WP_Block_Type $block_type Block Type. |
| 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, $options = array() X-Ref |
| Generates the CSS corresponding to the provided layout. return: string CSS styles on success. Else, empty string. param: string $selector CSS selector. param: array $layout Layout object. The one that is passed has already checked param: bool $has_block_gap_support Optional. Whether the theme has support for the block gap. Default false. param: string|string[]|null $gap_value Optional. The block gap value to apply. Default null. param: bool $should_skip_gap_serialization Optional. Whether to skip applying the user-defined value set in the editor. Default false. param: string|array $fallback_gap_value Optional. The block gap value to apply. If it's an array expected properties are "top" and/or "left". Default '0.5em'. param: array|null $block_spacing Optional. Custom spacing set on the block. Default null. param: array $options { |
| wp_render_layout_support_flag( $block_content, $block ) X-Ref |
| Renders the layout config to the block wrapper. return: string Filtered block content. param: string $block_content Rendered block content. param: array $block Block object. |
| wp_add_parent_layout_to_parsed_block( $parsed_block, $source_block, $parent_block ) X-Ref |
| Check if the parent block exists and if it has a layout attribute. If it does, add the parent layout to the parsed block return: array The parsed block with parent layout attribute if it exists. param: array $parsed_block The parsed block. param: array $source_block The source block. param: WP_Block $parent_block The parent block. |
| wp_restore_group_inner_container( $block_content, $block ) X-Ref |
| For themes without theme.json file, make sure to restore the inner div for the group block to avoid breaking styles relying on that div. return: string Filtered block content. param: string $block_content Rendered block content. param: array $block Block object. |
| wp_restore_image_outer_container( $block_content, $block ) X-Ref |
| No description |
| Generated : Sat Jul 4 08:20:12 2026 | Cross-referenced by PHPXref |