[ Index ]

WordPress 5.4.1

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    




/wp-includes/ -> class-wp-block-type.php (summary)

Blocks API: WP_Block_Type class

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

Defines 1 class

WP_Block_Type:: (6 methods):

Class: WP_Block_Type  - X-Ref

Core class representing a block type.

__construct( $block_type, $args = array()   X-Ref

Will populate object properties from the provided arguments.

param: string       $block_type Block type name including namespace.
param: array|string $args       Optional. Array or string of arguments for registering a block type.

render( $attributes = array()   X-Ref
Renders the block type output for given attributes.

param: array  $attributes Optional. Block attributes. Default empty array.
param: string $content    Optional. Block content. Default empty string.
return: string Rendered block type output.

is_dynamic()   X-Ref
Returns true if the block type is dynamic, or false otherwise. A dynamic
block is one which defers its rendering to occur on-demand at runtime.

return: boolean Whether block type is dynamic.

prepare_attributes_for_render( $attributes )   X-Ref
Validates attributes against the current block schema, populating
defaulted and missing values.

param: array $attributes Original block attributes.
return: array             Prepared block attributes.

set_props( $args )   X-Ref
Sets block type properties.

param: array|string $args Array or string of arguments for registering a block type.

get_attributes()   X-Ref
Get all available block attributes including possible layout attribute from Columns block.

return: array Array of attributes.

Generated: Tue May 19 15:51:04 2020 Cross-referenced by PHPXref 0.7.1