Changeset 29779
- Timestamp:
- 09/29/2014 03:44:25 AM (10 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/mce-view.js
r29649 r29779 438 438 * @param view {object} being refreshed 439 439 * @param text {string} textual representation of the view 440 * @param force {Boolean} whether to force rendering 440 441 */ 441 refreshView: function( view, text ) {442 refreshView: function( view, text, force ) { 442 443 var encodedText = window.encodeURIComponent( text ), 443 444 viewOptions, … … 455 456 } 456 457 457 instance.render( );458 instance.render( force ); 458 459 }, 459 460 … … 526 527 _.each( attachments, function( attachment ) { 527 528 if ( attachment.sizes ) { 528 if ( attachment.sizes.thumbnail ) { 529 if ( attrs.size && attachment.sizes[ attrs.size ] ) { 530 attachment.thumbnail = attachment.sizes[ attrs.size ]; 531 } else if ( attachment.sizes.thumbnail ) { 529 532 attachment.thumbnail = attachment.sizes.thumbnail; 530 533 } else if ( attachment.sizes.full ) { … … 553 556 554 557 frame.state('gallery-edit').on( 'update', function( selection ) { 555 var shortcode = gallery.shortcode( selection ).string() ;558 var shortcode = gallery.shortcode( selection ).string(), force; 556 559 $( node ).attr( 'data-wpview-text', window.encodeURIComponent( shortcode ) ); 557 wp.mce.views.refreshView( self, shortcode ); 560 force = ( data !== shortcode ); 561 wp.mce.views.refreshView( self, shortcode, force ); 558 562 }); 559 563 -
trunk/src/wp-includes/media-template.php
r29764 r29779 734 734 <span><?php _e( 'Random Order' ); ?></span> 735 735 <input type="checkbox" data-setting="_orderbyRandom" /> 736 </label> 737 738 <label class="setting size"> 739 <span><?php _e( 'Size' ); ?></span> 740 <select class="size" name="size" 741 data-setting="size" 742 <# if ( data.userSettings ) { #> 743 data-user-setting="imgsize" 744 <# } #> 745 > 746 <?php 747 // This filter is documented in wp-admin/includes/media.php 748 $size_names = apply_filters( 'image_size_names_choose', array( 749 'thumbnail' => __( 'Thumbnail' ), 750 'medium' => __( 'Medium' ), 751 'large' => __( 'Large' ), 752 'full' => __( 'Full Size' ), 753 ) ); 754 755 foreach ( $size_names as $size => $label ) : ?> 756 <option value="<?php echo esc_attr( $size ); ?>"> 757 <?php echo esc_html( $label ); ?> 758 </option> 759 <?php endforeach; ?> 760 </select> 736 761 </label> 737 762 </script>
Note: See TracChangeset
for help on using the changeset viewer.