WP_Navigation_Block_Renderer::get_template_part_blocks_html
Returns the html for blocks from a template part (without navigation container wrapper).
Method of the class: WP_Navigation_Block_Renderer{}
No Hooks.
Returns
String. Returns the html for the template part blocks.
Usage
$result = WP_Navigation_Block_Renderer::get_template_part_blocks_html( $blocks );
- $blocks(WP_Block_List) (required)
- The list of blocks to render.
Changelog
| Since 6.5.0 | Introduced. |
WP_Navigation_Block_Renderer::get_template_part_blocks_html() WP Navigation Block Renderer::get template part blocks html code WP 7.0
private static function get_template_part_blocks_html( $blocks ) {
$html = '';
foreach ( $blocks as $block ) {
$html .= $block->render();
}
return $html;
}