I am using the metabox.io plugin. I am looking for a way to open the new WordPress Gutenberg editors featured image modal onClick of a button inside my custom metabox.
Is there a function that I can use in order to make the featured image modal popup onClick of a button?
Basically, I want to replicate the functionality of the onClick of “Set featured image”.
So the Featured Image Modal pops up.
Thanks for your help.
I am using the metabox.io plugin. I am looking for a way to open the new WordPress Gutenberg editors featured image modal onClick of a button inside my custom metabox.
Is there a function that I can use in order to make the featured image modal popup onClick of a button?
Basically, I want to replicate the functionality of the onClick of “Set featured image”.
So the Featured Image Modal pops up.
Thanks for your help.
This was solved for me by Brandon Payton on Wordpress's Gutenberg support forum:
https://wordpress/support/topic/open-featured-image-modal-in-wordpress-gutenberg-onclick-of-a-button/
He was even awesome enough to create a gist:
https://gist.github/brandonpayton/2c30c6175702adb12a093cf258d754d2
You the man Brandon!!