0

I'm developing a plugin which let you select a fectured image for a post from an external resource e.g. an API

When I select an image, I want the image select window to close. I have tried with:

wp.media.view.Modal.close()

But it throws me an error in console:

wp.media.view.Modal.close is not a function

How can I close this windows from code?

Thank you in advance!

0

Your Answer

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

Browse other questions tagged or ask your own question.