1

I noticed that a plugin I am using has this hook during its rendering of a meta box in one of its settings tabs:

do_action( 'learndash_metabox_options_div_after', $metabox->settings_metabox_key );

I spent hours trying to figure out how to extend its meta box and display a couple additional fields, or add a meta box to this same tab, but finally gave up when I noticed this hook. So from this hook I just render my additional fields using the callback and save function that I wrote as I was trying to use add_meta_box, and all seems to work.

But can't help but think this is not good, and especially with the restAPI it can lead to trouble (since I didn't register these fields or anything). But why would there be a hook of this sort in the first place if it wasn't supposed to enable me to insert something into this meta box?

thanks, Brian

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.