File: wp-includes/blocks.php
-
functionget_block_metadata_i18n_schema()
Gets i18n schema for block’s metadata read from `block.json` file.
-
functionblock_has_support()
Checks whether the current block type supports the feature requested.
-
Converts typography keys declared under `supports.*` to `supports.typography.*`.
-
Helper function that constructs a WP_Query args array from a `Query` block properties.
-
function_excerpt_render_inner_blocks()
Renders inner blocks from the allowed wrapper blocks for generating an excerpt.
-
Filters the list of blocks that can be used as wrapper blocks, allowing excerpts to be generated from the `innerBlocks` of these wrappers.
-
Filters the settings determined from the block type metadata.
-
Filters the metadata provided for registering a block type.
-
Filters the default context provided to a rendered block.
-
functiongenerate_block_asset_handle()
Generates the name for an asset based on the name of the block and the field name provided.
-
functionregister_block_script_handle()
Finds a script handle for the selected block metadata field. It detects when a path to file was provided and optionally finds a corresponding asset file with details necessary to register the script under automatically generated handle name. It returns unprocessed script handle otherwise.
-
functionregister_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.
-
Registers a block type from the metadata stored in the `block.json` file.
-
functionremove_block_asset_path_prefix()
Removes the block asset’s path prefix if provided.
-
functionfilter_block_content()
Filters and sanitizes block content to remove non-allowable HTML from parsed block attribute values.
-
functionfilter_block_kses()
Filters and sanitizes a parsed block to remove non-allowable HTML from block attribute values.
-
functionfilter_block_kses_value()
Filters and sanitizes a parsed block attribute value to remove non-allowable HTML.
-
functionserialize_blocks()
Returns a joined string of the aggregate serialization of the given parsed blocks.
-
functionserialize_block_attributes()
Given an array of attributes, returns a string in the serialized attributes format prepared for post content.
-
functionstrip_core_block_namespace()
Returns the block name to use for serialization. This will remove the default “core/” namespace from a block name.
-
Returns the content of a block, including comment delimiters.
-
functionserialize_block()
Returns the content of a block, including comment delimiters, serializing all attributes from the given parsed block.
-
functionregister_block_style()
Registers a new block style.
-
functionunregister_block_style()
Unregisters a block style.
-
hookpre_render_block
Allows render_block() to be short-circuited, by returning a non-null value.
-
Filters the block being rendered in render_block(), before it’s processed.
-
functionblock_version()
Returns the current version of the block format that the content string is using.
-
function_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.
-
functionparse_blocks()
Parses blocks out of a content string.
-
Filter to allow plugins to replace the server-side block parser.