Timeline for Trigger refresh for new media manager in 3.5
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 7, 2018 at 22:56 | comment | added | AlanP |
I'm finding that wp.media.editor.get(wpActiveEditor).views._views[".media-frame-content"][0].views._views[""][2].collection.props.set({ignore:(+(new Date()))}); refreshes the 'Add Media' tab and wp.media.frame.content.get().collection.props.set({ignore: (+ new Date())}); refreshes the 'Featured Image' tab.
|
|
Sep 23, 2016 at 12:52 | comment | added | Ian |
For the above reason you're better off using the more generic version posted elsewhere in this question: wp.media.frame.content.get().collection.props.set({ignore: (+ new Date())});
|
|
Sep 23, 2016 at 12:35 | comment | added | Ian |
This is still a far from ideal solution, but it's worth noting the media-frame-content key has changed from 1 to 2: wp.media.editor.get(wpActiveEditor).views._views[".media-frame-content"][0].views._views[""][2].collection.props.set({ignore:(+(new Date()))})
|
|
Jun 21, 2014 at 13:22 | comment | added | Benjamin Intal | While both commands do trigger a refresh, afterwards you can no longer add images in the modal :( need another solution to this | |
Apr 21, 2014 at 17:31 | comment | added | Jermim bilal |
just found a "more official" way to do it: wp.media.frame.content.get('gallery').collection.props.set({ignore: (+ new Date())}); , in this case i'm refreshing the gallery tab.
|
|
Jun 24, 2013 at 18:58 | comment | added | Andrej | seems so intuitive :) nevertheless, this works!! THANK YOU!!! | |
Mar 9, 2013 at 19:25 | review | First posts | |||
Mar 9, 2013 at 20:07 | |||||
Mar 9, 2013 at 19:06 | history | answered | Nicky Hajal | CC BY-SA 3.0 |