Changeset 22495
- Timestamp:
- 11/09/2012 09:59:36 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/js/media-upload.js
r22480 r22495 104 104 105 105 workflow = workflows[ id ] = wp.media( _.defaults( options || {}, { 106 frame: 'post', 106 107 title: wp.media.view.l10n.insertMedia, 107 108 multiple: true -
trunk/wp-includes/js/mce-view.js
r22437 r22495 695 695 696 696 this.frame = wp.media({ 697 frame: 'post', 697 698 state: 'gallery-edit', 698 699 title: mceview.l10n.editGallery, -
trunk/wp-includes/js/media-models.js
r22494 r22495 8 8 * 9 9 * Handles the default media experience. Automatically creates 10 * and opens a media workflow, and returns the result.10 * and opens a media frame, and returns the result. 11 11 * Does nothing if the controllers do not exist. 12 12 * … … 15 15 */ 16 16 media = wp.media = function( attributes ) { 17 if ( media.view.MediaFrame.Post ) 18 return new media.view.MediaFrame.Post( attributes ).render().attach().open(); 17 var MediaFrame = media.view.MediaFrame, 18 frame; 19 20 if ( ! MediaFrame ) 21 return; 22 23 attributes = _.defaults( attributes || {}, { 24 frame: 'select' 25 }); 26 27 if ( 'select' === attributes.frame && MediaFrame.Select ) 28 frame = new MediaFrame.Select( attributes ); 29 else if ( 'post' === attributes.frame && MediaFrame.Post ) 30 frame = new MediaFrame.Post( attributes ); 31 32 delete attributes.frame; 33 return frame.render().attach().open(); 19 34 }; 20 35
Note: See TracChangeset
for help on using the changeset viewer.