recursively render \WP_Block object in PHP

[ad_1]

hi there,

I may be trying to be too clever, but I am in a situation where I have a \\WP\_Block object which has an inner\_blocks object which is a \\WP\_Block\_List that it itself has a blocks key which is an array of \\WP\_Block objects, etc.

​

Is there a way to render the entire WP\_Block object and traverse/recursively render its children?

​

Thanks,

Mat

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer