Media: Expose media grid frame via wp-media-grid-ready
trigger for easier customization.
Props soulseekah. Fixes #50185. git-svn-id: https://develop.svn.wordpress.org/trunk@47807 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
26a527fa9f
commit
36e4db6b01
@ -147,11 +147,14 @@
|
||||
if ( $mediaGridWrap.length && window.wp && window.wp.media ) {
|
||||
settings = _wpMediaGridSettings;
|
||||
|
||||
window.wp.media({
|
||||
var frame = window.wp.media({
|
||||
frame: 'manage',
|
||||
container: $mediaGridWrap,
|
||||
library: settings.queryVars
|
||||
}).open();
|
||||
|
||||
// Fire a global ready event.
|
||||
$mediaGridWrap.trigger( 'wp-media-grid-ready', frame );
|
||||
}
|
||||
|
||||
// Prevents form submission if no post has been selected.
|
||||
|
Loading…
Reference in New Issue
Block a user