wpseek.com
A WordPress-centric search engine for devs and theme authors
wp-includes/blocks.php › WordPress File
Functions27
› Functions related to registering and parsing blocks.
Function | Short description |
---|---|
block_version | Returns the current version of the block format that the content string is using. |
do_blocks | Parses dynamic blocks out of `post_content` and re-renders them. |
excerpt_remove_blocks | Parses blocks out of a content string, and renders those appropriate for the excerpt. |
filter_block_content | Filters and sanitizes block content to remove non-allowable HTML from parsed block attribute values. |
filter_block_kses | Filters and sanitizes a parsed block to remove non-allowable HTML from block attribute values. |
filter_block_kses_value | Filters and sanitizes a parsed block attribute value to remove non-allowable HTML. |
generate_block_asset_handle | Generates the name for an asset based on the name of the block and the field name provided. |
get_comment_delimited_block_content | Returns the content of a block, including comment delimiters. |
get_dynamic_block_names | Returns an array of the names of all registered dynamic block types. |
has_block | Determine whether a $post or a string contains a specific block type. |
has_blocks | Determine whether a post or content string has blocks. |
parse_blocks | Parses blocks out of a content string. |
register_block_script_handle | Finds a script handle for the selected block metadata field. It detects when a path to file was provided and finds a corresponding asset file with details necessary to register the script under automatically generated handle name. It returns unprocessed script handle otherwise. |
register_block_style | Registers a new block style. |
register_block_style_handle | Finds a style handle for the block metadata field. It detects when a path to file was provided and registers the style under automatically generated handle name. It returns unprocessed style handle otherwise. |
register_block_type | Registers a block type. |
register_block_type_from_metadata | Registers a block type from metadata stored in the `block.json` file. |
remove_block_asset_path_prefix | Removes the block asset's path prefix if provided. |
render_block | Renders a single block into a HTML string. |
serialize_block | Returns the content of a block, including comment delimiters, serializing all attributes from the given parsed block. |
serialize_blocks | Returns a joined string of the aggregate serialization of the given parsed blocks. |
serialize_block_attributes | Given an array of attributes, returns a string in the serialized attributes format prepared for post content. |
strip_core_block_namespace | Returns the block name to use for serialization. This will remove the default "core/" namespace from a block name. |
unregister_block_style | Unregisters a block style. |
unregister_block_type | Unregisters a block type. |
_excerpt_render_inner_columns_blocks | Render inner blocks from the `core/columns` block for generating an excerpt. |
_restore_wpautop_hook | If do_blocks() needs to remove wpautop() from the `the_content` filter, this re-adds it afterwards, for subsequent `the_content` usage. |