[wp-trac] [WordPress Trac] #29674: Add 'Size' selection to Insert Gallery dialog.

WordPress Trac noreply at wordpress.org
Mon Sep 15 01:19:53 UTC 2014


#29674: Add 'Size' selection to Insert Gallery dialog.
----------------------------+-----------------------------
 Reporter:  bahia0019       |      Owner:
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Media           |    Version:
 Severity:  normal          |   Keywords:
  Focuses:  administration  |
----------------------------+-----------------------------
 I'm proposing to add a 'Size' selection to the Insert Gallery window. It
 already has 'Link' and 'Columns' selectable, but should include 'Size' so
 people could easily chose something like '1 column + large size' or '2
 column + medium size.'

 I've seen this as a feature request, so the desire to have it is out
 there. Currently I add size="large" to the shortcode manually. It's a
 small thing, but it would be a nice benefit to have for end users that
 don't know you can do that.

 I've already created the code. It would just need to be added to media-
 template.php around line 730.


 {{{
                 <label class="setting">
                         <span><?php _e('Size'); ?></span>
                         <select class="size" name="size"
                                 data-setting="size">
                                 <# if ( data.userSettings ) { #>
                                         data-user-setting="imgsize"
                                 <# } #>>

                                 <option value="thumbnail" <# if ( !
 wp.media.galleryDefaults.size || 'thumbnail' ==
 wp.media.galleryDefaults.size ) {
                                         #>selected="selected"<# }
                                 #>>
                                         <?php esc_attr_e('Thumbnail'); ?>
                                 </option>
                                 <option value="medium" <# if ( 'file' ==
 wp.media.galleryDefaults.size ) { #>selected="selected"<# } #>>
                                         <?php esc_attr_e('Medium'); ?>
                                 </option>
                                 <option value="large" <# if ( 'none' ==
 wp.media.galleryDefaults.size ) { #>selected="selected"<# } #>>
                                         <?php esc_attr_e('Large'); ?>
                                 </option>
                         </select>
                 </label>
 }}}


 Thanks!!!

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29674>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list