Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#29674 closed enhancement (duplicate)

Add 'Size' selection to Insert Gallery dialog.

Reported by: bahia0019's profile bahia0019 Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Media Keywords:
Focuses: administration Cc:

Description

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!!!

Attachments (1)

2014-09-14_17-49-12.png (131.9 KB) - added by bahia0019 9 years ago.
Screenshot of 'Size' selector for Inserting Gallery.

Download all attachments as: .zip

Change History (2)

@bahia0019
9 years ago

Screenshot of 'Size' selector for Inserting Gallery.

#1 @SergeyBiryukov
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #18143.

Note: See TracTickets for help on using tickets.