Changeset 22667
- Timestamp:
- 11/19/2012 06:56:54 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/meta-boxes.php
r22561 r22667 1031 1031 1032 1032 $element.on( 'click', '.choose, img', function( event ) { 1033 var options, thumbnailId ;1033 var options, thumbnailId, attachment; 1034 1034 1035 1035 event.preventDefault(); … … 1048 1048 1049 1049 thumbnailId = $thumbnailId.val(); 1050 if ( '' !== thumbnailId && -1 !== thumbnailId ) 1051 options.selection = [ Attachment.get( thumbnailId ) ]; 1050 if ( '' !== thumbnailId && -1 !== thumbnailId ) { 1051 attachment = Attachment.get( thumbnailId ); 1052 attachment.fetch(); 1053 options.selection = [ attachment ]; 1054 } 1052 1055 1053 1056 frame = wp.media( options );
Note: See TracChangeset
for help on using the changeset viewer.