Gutenberg Dynamic Blocks: get parent block attributes inside render_callback
-
Hi there,
I need to access a parent blocks attributes to determine if my block is inside a column block and what width that column block has. Likely I have to go up to the columns block and check it’s attributes as well. How can I do this within my PHP render_callback function?Inside “gutenberg_examples_dynamic_render_callback” I will need access to all parent blocks until I hit the topmost block. Is there a function get_parent_block?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Gutenberg Dynamic Blocks: get parent block attributes inside render_callback’ is closed to new replies.