wpseek.com
A WordPress-centric search engine for devs and theme authors
wp-includes/blocks.php › WordPress File
Functions35
› Functions related to registering and parsing blocks.
Function | Short description |
---|---|
block_has_support | Checks whether the current block type supports the feature requested. |
block_version | Returns the current version of the block format that the content string is using. |
build_comment_query_vars_from_block | Helper function that constructs a comment query vars array from the passed block properties. |
build_query_vars_from_query_block | Helper function that constructs a WP_Query args array from a `Query` block properties. |
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_block_metadata_i18n_schema | Gets i18n schema for block's metadata read from `block.json` file. |
get_comments_pagination_arrow | Helper function that returns the proper pagination arrow HTML for `CommentsPaginationNext` and `CommentsPaginationPrevious` blocks based on the provided `paginationArrow` from `CommentsPagination` context. |
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. |
get_query_pagination_arrow | Helper function that returns the proper pagination arrow HTML for `QueryPaginationNext` and `QueryPaginationPrevious` blocks based on the provided `paginationArrow` from `QueryPagination` context. |
has_block | Determines whether a $post or a string contains a specific block type. |
has_blocks | Determines 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. The recommended way is to register a block type using the metadata stored in the `block.json` file. |
register_block_type_from_metadata | Registers a block type from the 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. |
wp_migrate_old_typography_shape | Converts typography keys declared under `supports.*` to `supports.typography.*`. |
_excerpt_render_inner_blocks | Renders inner blocks from the allowed wrapper blocks for generating an excerpt. |
_filter_block_content_callback | Callback used for regular expression replacement in filter_block_content(). |
_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. |