Title: wp-includes/blocks.php | Developer.WordPress.org

---

# File: wp-includes/blocks.php

 * function[_wp_apply_block_content_filters()](https://developer.wordpress.org/reference/functions/_wp_apply_block_content_filters/)
 * Applies standard content filters similar to the ‘the_content’ filter.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/_wp_apply_block_content_filters/#used-by)
   | Uses [7 functions](https://developer.wordpress.org/reference/functions/_wp_apply_block_content_filters/#uses)
   | Source: [wp-includes/blocks.php:2650](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L2650-L2674)
 * function[_wp_enqueue_auto_register_blocks()](https://developer.wordpress.org/reference/functions/_wp_enqueue_auto_register_blocks/)
 * Exposes blocks with autoRegister flag for ServerSideRender in the editor.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/_wp_enqueue_auto_register_blocks/#used-by)
   | Uses [3 functions](https://developer.wordpress.org/reference/functions/_wp_enqueue_auto_register_blocks/#uses)
   | Source: [wp-includes/blocks.php:3300](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L3300-L3317)
 * function[apply_block_hooks_to_content_from_post_object()](https://developer.wordpress.org/reference/functions/apply_block_hooks_to_content_from_post_object/)
 * Run the Block Hooks algorithm on a post object’s content.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/apply_block_hooks_to_content_from_post_object/#used-by)
   | Uses [10 functions](https://developer.wordpress.org/reference/functions/apply_block_hooks_to_content_from_post_object/#uses)
   | Source: [wp-includes/blocks.php:1274](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L1274-L1384)
 * function[wp_register_block_types_from_metadata_collection()](https://developer.wordpress.org/reference/functions/wp_register_block_types_from_metadata_collection/)
 * Registers all block types from a block metadata collection.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/wp_register_block_types_from_metadata_collection/#used-by)
   | Uses [3 functions](https://developer.wordpress.org/reference/functions/wp_register_block_types_from_metadata_collection/#uses)
   | Source: [wp-includes/blocks.php:473](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L473-L482)
 * function[extract_serialized_parent_block()](https://developer.wordpress.org/reference/functions/extract_serialized_parent_block/)
 * Accepts the serialized markup of a block and its inner blocks, and returns serialized
   markup of the wrapper block.
 * Used by [2 functions](https://developer.wordpress.org/reference/functions/extract_serialized_parent_block/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/functions/extract_serialized_parent_block/#uses)
   | Source: [wp-includes/blocks.php:1412](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L1412-L1416)
 * function[wp_register_block_metadata_collection()](https://developer.wordpress.org/reference/functions/wp_register_block_metadata_collection/)
 * Registers a block metadata collection.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/wp_register_block_metadata_collection/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/wp_register_block_metadata_collection/#uses)
   | Source: [wp-includes/blocks.php:496](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L496-L498)
 * function[filter_block_core_template_part_attributes()](https://developer.wordpress.org/reference/functions/filter_block_core_template_part_attributes/)
 * Sanitizes the value of the Template Part block’s `tagName` attribute.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/filter_block_core_template_part_attributes/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/filter_block_core_template_part_attributes/#uses)
   | Source: [wp-includes/blocks.php:2226](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L2226-L2234)
 * function[resolve_pattern_blocks()](https://developer.wordpress.org/reference/functions/resolve_pattern_blocks/)
 * Replaces patterns in a block tree with their content.
 * Used by [3 functions](https://developer.wordpress.org/reference/functions/resolve_pattern_blocks/#used-by)
   | Uses [4 functions](https://developer.wordpress.org/reference/functions/resolve_pattern_blocks/#uses)
   | Source: [wp-includes/blocks.php:1935](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L1935-L2033)
 * function[insert_hooked_blocks_into_rest_response()](https://developer.wordpress.org/reference/functions/insert_hooked_blocks_into_rest_response/)
 * Hooks into the REST API response for the Posts endpoint and adds the first and
   last inner blocks.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/insert_hooked_blocks_into_rest_response/#used-by)
   | Uses [6 functions](https://developer.wordpress.org/reference/functions/insert_hooked_blocks_into_rest_response/#uses)
   | Source: [wp-includes/blocks.php:1537](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L1537-L1577)
 * function[apply_block_hooks_to_content()](https://developer.wordpress.org/reference/functions/apply_block_hooks_to_content/)
 * Runs the hooked blocks algorithm on the given content.
 * Used by [9 functions](https://developer.wordpress.org/reference/functions/apply_block_hooks_to_content/#used-by)
   | Uses [12 functions](https://developer.wordpress.org/reference/functions/apply_block_hooks_to_content/#uses)
   | Source: [wp-includes/blocks.php:1162](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L1162-L1248)
 * function[remove_serialized_parent_block()](https://developer.wordpress.org/reference/functions/remove_serialized_parent_block/)
 * Accepts the serialized markup of a block and its inner blocks, and returns serialized
   markup of the inner blocks.
 * Used by [5 functions](https://developer.wordpress.org/reference/functions/remove_serialized_parent_block/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/functions/remove_serialized_parent_block/#uses)
   | Source: [wp-includes/blocks.php:1395](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L1395-L1399)
 * function[update_ignored_hooked_blocks_postmeta()](https://developer.wordpress.org/reference/functions/update_ignored_hooked_blocks_postmeta/)
 * Updates the wp_postmeta with the list of ignored hooked blocks where the inner
   blocks are stored as post content.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/update_ignored_hooked_blocks_postmeta/#used-by)
   | Uses [7 functions](https://developer.wordpress.org/reference/functions/update_ignored_hooked_blocks_postmeta/#uses)
   | Source: [wp-includes/blocks.php:1429](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L1429-L1501)
 * function[insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata()](https://developer.wordpress.org/reference/functions/insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata/)
 * Returns the markup for blocks hooked to the given anchor block in a specific 
   relative position and then adds a list of hooked block types to an anchor block’s
   ignored hooked block types.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/functions/insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata/#uses)
   | Source: [wp-includes/blocks.php:1519](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L1519-L1524)
 * hook[hooked_block_{$hooked_block_type}](https://developer.wordpress.org/reference/hooks/hooked_block_hooked_block_type/)
 * Filters the parsed block array for a given hooked block.
 * Used by [2 functions](https://developer.wordpress.org/reference/hooks/hooked_block_hooked_block_type/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/hooked_block_hooked_block_type/#uses)
   | Source: [wp-includes/blocks.php:1066](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L1066-L1066)
 * function[set_ignored_hooked_blocks_metadata()](https://developer.wordpress.org/reference/functions/set_ignored_hooked_blocks_metadata/)
 * Adds a list of hooked block types to an anchor block’s ignored hooked block types.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/set_ignored_hooked_blocks_metadata/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/set_ignored_hooked_blocks_metadata/#uses)
   | Source: [wp-includes/blocks.php:1100](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L1100-L1142)
 * hook[hooked_block](https://developer.wordpress.org/reference/hooks/hooked_block/)
 * Filters the parsed block array for a given hooked block.
 * Used by [2 functions](https://developer.wordpress.org/reference/hooks/hooked_block/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/hooked_block/#uses)
   | Source: [wp-includes/blocks.php:1050](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L1050-L1050)
 * function[insert_hooked_blocks()](https://developer.wordpress.org/reference/functions/insert_hooked_blocks/)
 * Returns the markup for blocks hooked to the given anchor block in a specific 
   relative position.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/insert_hooked_blocks/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/functions/insert_hooked_blocks/#uses)
   | Source: [wp-includes/blocks.php:1008](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L1008-L1083)
 * function[register_block_script_module_id()](https://developer.wordpress.org/reference/functions/register_block_script_module_id/)
 * Finds a script module ID for the selected block metadata field.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/register_block_script_module_id/#used-by)
   | Uses [6 functions](https://developer.wordpress.org/reference/functions/register_block_script_module_id/#uses)
   | Source: [wp-includes/blocks.php:169](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L169-L231)
 * function[_wp_footnotes_kses_init()](https://developer.wordpress.org/reference/functions/_wp_footnotes_kses_init/)
 * Registers the filter of footnotes meta field if the user does not have `unfiltered_html`
   capability.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/_wp_footnotes_kses_init/#used-by)
   | Uses [3 functions](https://developer.wordpress.org/reference/functions/_wp_footnotes_kses_init/#uses)
   | Source: [wp-includes/blocks.php:3262](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L3262-L3267)
 * function[_wp_footnotes_force_filtered_html_on_import_filter()](https://developer.wordpress.org/reference/functions/_wp_footnotes_force_filtered_html_on_import_filter/)
 * Initializes the filters for footnotes meta field when imported data should be
   filtered.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/_wp_footnotes_force_filtered_html_on_import_filter/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/_wp_footnotes_force_filtered_html_on_import_filter/#uses)
   | Source: [wp-includes/blocks.php:3283](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L3283-L3289)
 * function[_wp_footnotes_remove_filters()](https://developer.wordpress.org/reference/functions/_wp_footnotes_remove_filters/)
 * Removes the filters for footnotes meta field.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/_wp_footnotes_remove_filters/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/_wp_footnotes_remove_filters/#uses)
   | Source: [wp-includes/blocks.php:3252](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L3252-L3254)
 * function[_wp_footnotes_kses_init_filters()](https://developer.wordpress.org/reference/functions/_wp_footnotes_kses_init_filters/)
 * Adds the filters for footnotes meta field.
 * Used by [2 functions](https://developer.wordpress.org/reference/functions/_wp_footnotes_kses_init_filters/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/_wp_footnotes_kses_init_filters/#uses)
   | Source: [wp-includes/blocks.php:3242](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L3242-L3244)
 * function[_wp_filter_post_meta_footnotes()](https://developer.wordpress.org/reference/functions/_wp_filter_post_meta_footnotes/)
 * Strips all HTML from the content of footnotes, and sanitizes the ID.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/_wp_filter_post_meta_footnotes/#used-by)
   | Uses [5 functions](https://developer.wordpress.org/reference/functions/_wp_filter_post_meta_footnotes/#uses)
   | Source: [wp-includes/blocks.php:3219](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L3219-L3234)
 * function[traverse_and_serialize_blocks()](https://developer.wordpress.org/reference/functions/traverse_and_serialize_blocks/)
 * Given an array of parsed block trees, applies callbacks before and after serializing
   them and returns their concatenated output.
 * Used by [2 functions](https://developer.wordpress.org/reference/functions/traverse_and_serialize_blocks/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/traverse_and_serialize_blocks/#uses)
   | Source: [wp-includes/blocks.php:2070](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L2070-L2105)
 * function[traverse_and_serialize_block()](https://developer.wordpress.org/reference/functions/traverse_and_serialize_block/)
 * Traverses a parsed block tree and applies callbacks before and after serializing
   it.
 * Used by [2 functions](https://developer.wordpress.org/reference/functions/traverse_and_serialize_block/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/functions/traverse_and_serialize_block/#uses)
   | Source: [wp-includes/blocks.php:1875](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L1875-L1923)
 * function[make_after_block_visitor()](https://developer.wordpress.org/reference/functions/make_after_block_visitor/)
 * Returns a function that injects the hooked blocks after a given block.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/make_after_block_visitor/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/functions/make_after_block_visitor/#uses)
   | Source: [wp-includes/blocks.php:1658](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L1658-L1686)
 * hook[hooked_block_types](https://developer.wordpress.org/reference/hooks/hooked_block_types/)
 * Filters the list of hooked block types for a given anchor block type and relative
   position.
 * Used by [2 functions](https://developer.wordpress.org/reference/hooks/hooked_block_types/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/hooked_block_types/#uses)
   | Source: [wp-includes/blocks.php:1026](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L1026-L1026)
 * function[make_before_block_visitor()](https://developer.wordpress.org/reference/functions/make_before_block_visitor/)
 * Returns a function that injects the theme attribute into, and hooked blocks before,
   a given block.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/make_before_block_visitor/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/make_before_block_visitor/#uses)
   | Source: [wp-includes/blocks.php:1601](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L1601-L1634)
 * function[get_hooked_blocks()](https://developer.wordpress.org/reference/functions/get_hooked_blocks/)
 * Retrieves block types hooked into the given block, grouped by anchor block type
   and the relative position.
 * Used by [2 functions](https://developer.wordpress.org/reference/functions/get_hooked_blocks/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/get_hooked_blocks/#uses)
   | Source: [wp-includes/blocks.php:974](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L974-L993)
 * function[get_block_asset_url()](https://developer.wordpress.org/reference/functions/get_block_asset_url/)
 * Gets the URL to a block asset.
 * Used by [3 functions](https://developer.wordpress.org/reference/functions/get_block_asset_url/#used-by)
   | Uses [10 functions](https://developer.wordpress.org/reference/functions/get_block_asset_url/#uses)
   | Source: [wp-includes/blocks.php:97](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L97-L136)

1 [2](https://developer.wordpress.org/reference/files/wp-includes/blocks.php/page/2/?output_format=md)
[3](https://developer.wordpress.org/reference/files/wp-includes/blocks.php/page/3/?output_format=md)

 [Next Page](https://developer.wordpress.org/reference/files/wp-includes/blocks.php/page/2/?output_format=md)