How to modify an Ultimate Add On Gutenberg Section and run a hook on save?

Question

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:

  1. Add a title for the block.
  2. Using the title, add a Heading with a class name and custom data attribute. So like
  3. 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?

thanks,
Brian

0
Brian 2 years 2019-11-21T08:21:10-05:00 0 Answers 59 views 0

Leave an answer

Browse
Browse