Add a function for checking the block existence in a page template #43967
Labels
[Feature] Site Editor
Related to the overarching Site Editor (formerly "full site editing")
[Type] Discussion
For issues that are high-level and not yet ready to implement.
[Type] Enhancement
A suggestion for improvement.
Templates and template parts contain block markup that represents blocks and block settings. Is it possible to make a function which will parse the current page template and check whether a particular block is presented in the template? This function should also work for the Site Editor and such pages like search, archives, 404. So to look not only in post_content. For example it should be possible to detect whether a search block is added to the page header. The common use case - loading custom assets for core blocks after they are rendered.
The text was updated successfully, but these errors were encountered: