[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/block-supports/ -> dimensions.php (summary)

Dimensions block support flag. This does not include the `spacing` block support even though that visually appears under the "Dimensions" panel in the editor. It remains in its original `spacing.php` file for compatibility with core.

File Size: 173 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 3 functions

  wp_register_dimensions_support()
  wp_apply_dimensions_support()
  wp_render_dimensions_support()

Functions
Functions that are not part of a class:

wp_register_dimensions_support( $block_type )   X-Ref
Registers the style block attribute for block types that support it.

param: WP_Block_Type $block_type Block Type.

wp_apply_dimensions_support( $block_type, $block_attributes )   X-Ref
Adds CSS classes for block dimensions to the incoming attributes array.
This will be applied to the block markup in the front-end.

param: WP_Block_Type $block_type       Block Type.
param: array         $block_attributes Block attributes.
return: array Block dimensions CSS classes and inline styles.

wp_render_dimensions_support( $block_content, $block )   X-Ref
Renders server-side dimensions styles to the block wrapper.
This block support uses the `render_block` hook to ensure that
it is also applied to non-server-rendered blocks.

param: string $block_content Rendered block content.
param: array  $block         Block object.
return: string                Filtered block content.



Generated : Thu Nov 21 08:20:01 2024 Cross-referenced by PHPXref