0

I am successfully able to create a number of custom metaboxes. There are a number of tutorials online that help with that.

My question is how to include embedded options in a custom metabox?

So, what are embedded options? Well, if you take the "Publish Post" metabox, for example, this is what you will see:

enter image description here

Notice that if you click on the "Edit" link that is circled in red in the image above, this is what you will end up with:

enter image description here

Those are what I call embedded options (I do not know the term for them, so I came up with that name). And what I want to do is something similar. I know I can achieve that with JavaScript/AJAX, but I like to know if there are already pre-written methods in WordPress and a process to follow for creating that part of the metabox so that I do not re-invent the wheel.

Thanks.

1 Answer 1

0

After a long investigation, it turned out that there isn't any WordPress method that generates that information via methods/functions. That functionality should be built manually. For example, for the "publish post" metabox which contains the required functionality above, the code is listed here

https://core.trac.wordpress.org/browser/tags/4.9/src/wp-admin/includes/meta-boxes.php#L22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.