Changeset 22580
- Timestamp:
- 11/14/2012 10:08:02 PM (12 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/media-views.js
r22558 r22580 2140 2140 2141 2141 if ( 'image' === options.type ) 2142 _.extend( options, this.imageSize());2142 options.size = this.imageSize(); 2143 2143 2144 2144 this.$el.html( this.template( options ) ); -
trunk/wp-includes/media.php
r22578 r22580 1281 1281 } 1282 1282 1283 $ response = array_merge( $response,array(1283 $sizes['full'] = array( 1284 1284 'height' => $meta['height'], 1285 1285 'width' => $meta['width'], 1286 ' sizes' => $sizes,1286 'url' => $attachment_url, 1287 1287 'orientation' => $meta['height'] > $meta['width'] ? 'portrait' : 'landscape', 1288 ) ); 1288 ); 1289 1290 $response = array_merge( $response, array( 'sizes' => $sizes ), $sizes['full'] ); 1289 1291 } 1290 1292 … … 1431 1433 <div class="thumbnail"> 1432 1434 <div class="centered"> 1433 <img src="{{ data. url }}" draggable="false" />1435 <img src="{{ data.size.url }}" draggable="false" /> 1434 1436 </div> 1435 1437 </div> … … 1469 1471 <div class="media-progress-bar"><div></div></div> 1470 1472 <# } else if ( 'image' === data.type ) { #> 1471 <img src="{{ data. url }}" draggable="false" />1473 <img src="{{ data.size.url }}" draggable="false" /> 1472 1474 <# } else { #> 1473 1475 <img src="{{ data.icon }}" class="icon" draggable="false" /> … … 1610 1612 ) ); 1611 1613 1612 foreach ( $sizes as $value => $name ) : 1613 if ( 'full' === $name ) 1614 continue; 1615 ?> 1616 <# if ( data.sizes['<?php echo esc_js( $value ); ?>'] ) { #> 1614 foreach ( $sizes as $value => $name ) : ?> 1615 <# 1616 var size = data.sizes['<?php echo esc_js( $value ); ?>']; 1617 if ( size ) { #> 1617 1618 <option value="<?php echo esc_attr( $value ); ?>" <?php selected( $value, 'medium' ); ?>> 1618 <?php echo esc_html( $name ); ?> 1619 <?php echo esc_html( $name ); ?> – {{ size.width }} × {{ size.height }} 1619 1620 </option> 1620 1621 <# } #>> 1621 <?php endforeach; 1622 1623 if ( ! empty( $sizes['full'] ) ) : ?> 1624 <option value="full"> 1625 <?php echo esc_html( $sizes['full'] ); ?> 1626 </option> 1627 <?php endif; ?> 1622 <?php endforeach; ?> 1628 1623 </select> 1629 1624 </label>
Note: See TracChangeset
for help on using the changeset viewer.