How to modify an Ultimate Add On Gutenberg Section and run a hook on save?
I have a course site where I want to have repeatable section types. Like Exercise.
I think UAG Section Block makes sense here, but I need to do additional formatting, and some database actions.
Here is what I am trying to do:
- Add a title for the block.
- Using the title, add a Heading with a class name and custom data attribute. So like
- Upon saving the post, hook into the block so I can update my database. For instance
update_post_meta($post_id, 'exercises', [id1, id2])where id2 is the block id that I just added
Any ideas on how to do this, or a better way to accomplish what I am trying to do?