Ticket #22775: 22775.diff
File 22775.diff, 1.7 KB (added by , 12 years ago) |
---|
-
wp-admin/js/custom-background.js
32 32 } 33 33 34 34 // Create the media frame. 35 frame = wp.media ({35 frame = wp.media.frames.customBackground = wp.media({ 36 36 // Set the title of the modal. 37 37 title: $el.data('choose'), 38 38 -
wp-admin/js/custom-header.js
18 18 var $el = $(this); 19 19 event.preventDefault(); 20 20 21 // If the media frame already exists, reopen it. 22 if ( frame ) { 23 frame.open(); 24 return; 25 } 26 21 27 // Create the media frame. 22 frame = wp.media ({28 frame = wp.media.frames.customHeader = wp.media({ 23 29 // Set the title of the modal. 24 30 title: $el.data('choose'), 25 31 -
wp-includes/js/media-models.js
34 34 return frame; 35 35 }; 36 36 37 _.extend( media, { model: {}, view: {}, controller: {} });37 _.extend( media, { model: {}, view: {}, controller: {}, frames: {} }); 38 38 39 39 // Link any localized strings. 40 40 l10n = media.model.l10n = typeof _wpMediaModelsL10n === 'undefined' ? {} : _wpMediaModelsL10n; … … 216 216 * ======================================================================== 217 217 */ 218 218 219 /** 220 * wp.media.attachment 221 */ 222 media.attachment = function( id ) { 223 return Attachment.get( id ); 224 }; 225 219 226 /** 220 227 * wp.media.model.Attachment 221 228 */