• pavel089

    (@pavel089)


    Hello, I am looking for information on how to switch the tab of the open media library and how to reload the frame pictures.

    The task is this, i am writing an extension for integration with a third-party resource, an alternative way of choosing a picture. The picture will be downloaded to the backend, a post type attachment will be created, and after that, when everything is ready, i am just need to reload the pictures in the open frame window, for the uploaded picture to appear in the list.

    Now we are talking about wp.media.frame where the frame property is the currently open library window. For example, to close a frame window, we can call the wp.media.frame.close() method, or to get the selected picture we can use – wp.media.frame.state().get('selection').first()

    But I can’t figure out how to reload the frame and switch the active tab button. Maybe someone knows how to do this? I would be very grateful for any help.

  • The topic ‘How to switch tab and reload the wp.media.frame?’ is closed to new replies.