Changeset 27580
- Timestamp:
- 03/18/2014 03:24:17 AM (11 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/mce-view.js
r27530 r27580 269 269 getHtml: function() { 270 270 var attrs = this.shortcode.attrs.named, 271 options; 271 options, 272 attachments; 272 273 273 274 if ( ! this.attachments.length ) { … … 275 276 } 276 277 278 attachments = this.attachments.toJSON(); 279 280 _.each( attachments, function( attachment ) { 281 if ( attachment.sizes.thumbnail ) { 282 attachment.thumbnail = attachment.sizes.thumbnail; 283 } else { 284 attachment.thumbnail = attachment.sizes.full; 285 } 286 } ); 287 277 288 options = { 278 attachments: this.attachments.toJSON(),289 attachments: attachments, 279 290 columns: attrs.columns ? parseInt( attrs.columns, 10 ) : 3 280 291 }; -
trunk/src/wp-includes/media-template.php
r27578 r27580 898 898 </div> 899 899 </script> 900 <?php901 902 //TODO: do we want to deal with the fact that the elements used for gallery items are filterable and can be overriden via shortcode attributes903 // do we want to deal with the difference between display and edit context at all? (e.g. wptexturize() being applied to the caption.904 ?>905 906 900 <script type="text/html" id="tmpl-editor-gallery"> 907 901 <div class="toolbar"> … … 913 907 <dl class="gallery-item"> 914 908 <dt class="gallery-icon"> 915 <?php // TODO: need to figure out the best way to make sure that we have thumbnails ?> 916 <img src="{{{ attachment.sizes.thumbnail.url }}}" /> 909 <img src="{{{ attachment.thumbnail.url }}}" width="{{ attachment.thumbnail.width }}" height="{{ attachment.thumbnail.height }}" /> 917 910 </dt> 918 911 <dd class="wp-caption-text gallery-caption"> … … 920 913 </dd> 921 914 </dl> 922 <?php // this is kind silly, but copied from the gallery shortcode. Maybe it should be removed ?>923 915 <# if ( index % data.columns === data.columns - 1 ) { #> 924 916 <br style="clear: both;">
Note: See TracChangeset
for help on using the changeset viewer.