wp-includes/blocks.php:2216Parses blocks out of a content string.
$contentstringarray[]...$0array
$blockNamestring
$attrsarray
$innerBlocksarray[]
$innerHTMLstring
$innerContentarray
One hook fires while parse_blocks() runs, in this order:
Filter to allow plugins to replace the server-side block parser.
function parse_blocks( $content ) { /** * Filter to allow plugins to replace the server-side block parser. * * @since 5.0.0 * * @param string $parser_class Name of block parser class. */ $parser_class = apply_filters( 'block_parser_class', 'WP_Block_Parser' ); $parser = new $parser_class(); return $parser->parse( $content );}Introduced in 5.0.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/blocks.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.