WordPress at a glance
function is not described

do_blocks() WP 5.0.0

Parses dynamic blocks out of post_content and re-renders them.

  • Global. WP_Post. $post The post to edit.

No Hooks.

Return

String. Updated post content.

Usage

do_blocks( $content );
$content(string) (required)
Post content.

Code of do blocks: wp-includes/blocks.php VER 5.1.1

<?php
function do_blocks( $content ) {
	// If there are blocks in this content, we shouldn't run wpautop() on it later.
	$priority = has_filter( 'the_content', 'wpautop' );
	if ( false !== $priority && doing_filter( 'the_content' ) && has_blocks( $content ) ) {
		remove_filter( 'the_content', 'wpautop', $priority );
		add_filter( 'the_content', '_restore_wpautop_hook', $priority + 1 );
	}

	$blocks = parse_blocks( $content );
	$output = '';

	foreach ( $blocks as $block ) {
		$output .= render_block( $block );
	}

	return $output;
}