WordPress.org

Make WordPress Core

Changeset 47807


Ignore:
Timestamp:
05/16/2020 05:23:31 PM (4 months ago)
Author:
SergeyBiryukov
Message:

Media: Expose media grid frame via wp-media-grid-ready trigger for easier customization.

Props soulseekah.
Fixes #50185.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/admin/media.js

    r46800 r47807  
    148148            settings = _wpMediaGridSettings;
    149149
    150             window.wp.media({
     150            var frame = window.wp.media({
    151151                frame: 'manage',
    152152                container: $mediaGridWrap,
    153153                library: settings.queryVars
    154154            }).open();
     155
     156            // Fire a global ready event.
     157            $mediaGridWrap.trigger( 'wp-media-grid-ready', frame );
    155158        }
    156159
Note: See TracChangeset for help on using the changeset viewer.