Gutenberg is there a way to know if the current block is reusable?

So I have developed some blocks using React, I save my css generated in the post meta, that’s works fine. In the case of reusable blocks:

  • Whene we set a block as reusable this block will saved as hidden CPT (wp_block) as the documentation. (https://developer.wordpress.org/block-editor/explanations/architecture/key-concepts/#reusable-blocks).
  • Since the block is reusable I wanted to save the css generated for the reusable block in one place (post meta for wp_block CPT for example), that’s will achieve the goal of reusable block, whene the reusable block changed, this will affect all place (posts/pages) that use this reusable block.
    For that I wanted to check if rendred block is reusable to handle some logic?

0

Leave a Comment