access enclosing block properties
-
Is there a way to access the parent block type/name from within a shortcode function?
Trivial, semi-nonsensical example to illustrate:
add_shortcode('trivial_example', function() { if (parent_block['wp:shortcode']) { return 'x' } elseif (parent_block['wp:paragraph']) { return 'y' } }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘access enclosing block properties’ is closed to new replies.