wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



wp-includes/blocks.php › WordPress File

Funções50
Functions related to registering and parsing blocks.


Function Short description
block_has_supportChecks whether the current block type supports the feature requested.
block_versionReturns the current version of the block format that the content string is using.
build_comment_query_vars_from_blockHelper function that constructs a comment query vars array from the passed block properties.
build_query_vars_from_query_blockHelper function that constructs a WP_Query args array from a `Query` block properties.
do_blocksParses dynamic blocks out of `post_content` and re-renders them.
excerpt_remove_blocksParses blocks out of a content string, and renders those appropriate for the excerpt.
excerpt_remove_footnotesParses footnotes markup out of a content string, and renders those appropriate for the excerpt.
filter_block_contentFilters and sanitizes block content to remove non-allowable HTML from parsed block attribute values.
filter_block_ksesFilters and sanitizes a parsed block to remove non-allowable HTML from block attribute values.
filter_block_kses_valueFilters and sanitizes a parsed block attribute value to remove non-allowable HTML.
generate_block_asset_handleGenerates the name for an asset based on the name of the block and the field name provided.
get_block_asset_urlGets the URL to a block asset.
get_block_metadata_i18n_schemaGets i18n schema for block's metadata read from `block.json` file.
get_comments_pagination_arrowHelper 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_contentReturns the content of a block, including comment delimiters.
get_dynamic_block_namesReturns an array of the names of all registered dynamic block types.
get_hooked_blocksRetrieves block types hooked into the given block, grouped by anchor block type and the relative position.
get_query_pagination_arrowHelper function that returns the proper pagination arrow HTML for `QueryPaginationNext` and `QueryPaginationPrevious` blocks based on the provided `paginationArrow` from `QueryPagination` context.
has_blockDetermines whether a $post or a string contains a specific block type.
has_blocksDetermines whether a post or content string has blocks.
insert_hooked_blocksReturns the markup for blocks hooked to the given anchor block in a specific relative position.
make_after_block_visitorReturns a function that injects the hooked blocks after a given block.
make_before_block_visitorReturns a function that injects the theme attribute into, and hooked blocks before, a given block.
parse_blocksParses blocks out of a content string.
register_block_script_handleFinds 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.
register_block_script_module_idFinds a script module ID 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 module under with an automatically generated module ID. It returns unprocessed script module ID otherwise.
register_block_styleRegisters a new block style.
register_block_style_handleFinds 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_typeRegisters 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_metadataRegisters a block type from the metadata stored in the `block.json` file.
remove_block_asset_path_prefixRemoves the block asset's path prefix if provided.
render_blockRenders a single block into a HTML string.
serialize_blockReturns the content of a block, including comment delimiters, serializing all attributes from the given parsed block.
serialize_blocksReturns a joined string of the aggregate serialization of the given parsed blocks.
serialize_block_attributesGiven an array of attributes, returns a string in the serialized attributes format prepared for post content.
set_ignored_hooked_blocks_metadataAdds a list of hooked block types to an anchor block's ignored hooked block types.
strip_core_block_namespaceReturns the block name to use for serialization. This will remove the default "core/" namespace from a block name.
traverse_and_serialize_blockTraverses a parsed block tree and applies callbacks before and after serializing it.
traverse_and_serialize_blocksGiven an array of parsed block trees, applies callbacks before and after serializing them and returns their concatenated output.
unregister_block_styleUnregisters a block style.
unregister_block_typeUnregisters a block type.
wp_migrate_old_typography_shapeConverts typography keys declared under `supports.*` to `supports.typography.*`.
_excerpt_render_inner_blocksRenders inner blocks from the allowed wrapper blocks for generating an excerpt.
_filter_block_content_callbackCallback used for regular expression replacement in filter_block_content().
_restore_wpautop_hookIf do_blocks() needs to remove wpautop() from the `the_content` filter, this re-adds it afterwards, for subsequent `the_content` usage.
_wp_filter_post_meta_footnotesStrips all HTML from the content of footnotes, and sanitizes the ID.
_wp_footnotes_force_filtered_html_on_import_filterInitializes the filters for footnotes meta field when imported data should be filtered.
_wp_footnotes_kses_initRegisters the filter of footnotes meta field if the user does not have `unfiltered_html` capability.
_wp_footnotes_kses_init_filtersAdds the filters for footnotes meta field.
_wp_footnotes_remove_filtersRemoves the filters for footnotes meta field.