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

---

# File: wp-includes/blocks.php

 * hook[pre_render_block](https://developer.wordpress.org/reference/hooks/pre_render_block/)
 * Allows render_block() to be short-circuited, by returning a non-null value.
 * Used by [2 functions](https://developer.wordpress.org/reference/hooks/pre_render_block/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/pre_render_block/#uses)
   | Source: [wp-includes/blocks.php:2436](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L2436-L2436)
 * hook[render_block_data](https://developer.wordpress.org/reference/hooks/render_block_data/)
 * Filters the block being rendered in render_block(), before it’s processed.
 * Used by [2 functions](https://developer.wordpress.org/reference/hooks/render_block_data/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/render_block_data/#uses)
   | Source: [wp-includes/blocks.php:2474](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L2474-L2474)
 * function[block_version()](https://developer.wordpress.org/reference/functions/block_version/)
 * Returns the current version of the block format that the content string is using.
 * Used by [2 functions](https://developer.wordpress.org/reference/functions/block_version/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/block_version/#uses)
   | Source: [wp-includes/blocks.php:2686](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L2686-L2688)
 * function[parse_blocks()](https://developer.wordpress.org/reference/functions/parse_blocks/)
 * Parses blocks out of a content string.
 * Used by [16 functions](https://developer.wordpress.org/reference/functions/parse_blocks/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/parse_blocks/#uses)
   | Source: [wp-includes/blocks.php:2550](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L2550-L2562)
 * hook[block_parser_class](https://developer.wordpress.org/reference/hooks/block_parser_class/)
 * Filter to allow plugins to replace the server-side block parser.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/block_parser_class/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/block_parser_class/#uses)
   | Source: [wp-includes/blocks.php:2558](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L2558-L2558)
 * function[do_blocks()](https://developer.wordpress.org/reference/functions/do_blocks/)
 * Parses dynamic blocks out of `post_content` and re-renders them.
 * Used by [3 functions](https://developer.wordpress.org/reference/functions/do_blocks/#used-by)
   | Uses [7 functions](https://developer.wordpress.org/reference/functions/do_blocks/#uses)
   | Source: [wp-includes/blocks.php:2572](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L2572-L2609)
 * function[_restore_wpautop_hook()](https://developer.wordpress.org/reference/functions/_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.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/_restore_wpautop_hook/#used-by)
   | Uses [3 functions](https://developer.wordpress.org/reference/functions/_restore_wpautop_hook/#uses)
   | Source: [wp-includes/blocks.php:2621](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L2621-L2628)
 * function[render_block()](https://developer.wordpress.org/reference/functions/render_block/)
 * Renders a single block into a HTML string.
 * Used by [4 functions](https://developer.wordpress.org/reference/functions/render_block/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/functions/render_block/#uses)
   | Source: [wp-includes/blocks.php:2412](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L2412-L2515)
 * function[register_block_type()](https://developer.wordpress.org/reference/functions/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.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/register_block_type/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/functions/register_block_type/#uses)
   | Source: [wp-includes/blocks.php:842](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L842-L848)
 * function[unregister_block_type()](https://developer.wordpress.org/reference/functions/unregister_block_type/)
 * Unregisters a block type.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/unregister_block_type/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/unregister_block_type/#uses)
   | Source: [wp-includes/blocks.php:859](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L859-L861)
 * function[has_blocks()](https://developer.wordpress.org/reference/functions/has_blocks/)
 * Determines whether a post or content string has blocks.
 * Used by [6 functions](https://developer.wordpress.org/reference/functions/has_blocks/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/has_blocks/#uses)
   | Source: [wp-includes/blocks.php:878](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L878-L890)
 * function[has_block()](https://developer.wordpress.org/reference/functions/has_block/)
 * Determines whether a $post or a string contains a specific block type.
 * Used by [3 functions](https://developer.wordpress.org/reference/functions/has_block/#used-by)
   | Uses [3 functions](https://developer.wordpress.org/reference/functions/has_block/#uses)
   | Source: [wp-includes/blocks.php:909](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L909-L945)
 * function[get_dynamic_block_names()](https://developer.wordpress.org/reference/functions/get_dynamic_block_names/)
 * Returns an array of the names of all registered dynamic block types.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/get_dynamic_block_names/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/get_dynamic_block_names/#uses)
   | Source: [wp-includes/blocks.php:954](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L954-L965)
 * function[excerpt_remove_blocks()](https://developer.wordpress.org/reference/functions/excerpt_remove_blocks/)
 * Parses blocks out of a content string, and renders those appropriate for the 
   excerpt.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/excerpt_remove_blocks/#used-by)
   | Uses [5 functions](https://developer.wordpress.org/reference/functions/excerpt_remove_blocks/#uses)
   | Source: [wp-includes/blocks.php:2247](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L2247-L2332)
 * hook[excerpt_allowed_blocks](https://developer.wordpress.org/reference/hooks/excerpt_allowed_blocks/)
 * Filters the list of blocks that can contribute to the excerpt.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/excerpt_allowed_blocks/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/excerpt_allowed_blocks/#uses)
   | Source: [wp-includes/blocks.php:2296](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/blocks.php#L2296-L2296)

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

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