Add size to the UI for Gallery Settings in the media modal. Ensure that the TinyMCE view is refreshed when size changes.

Props richardmtl, noplanman, wonderboymusic.
Fixes #18143.


git-svn-id: https://develop.svn.wordpress.org/trunk@29779 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2014-09-29 03:44:25 +00:00
parent 0fe756a461
commit d19b2ded94
2 changed files with 34 additions and 5 deletions
+25
View File
@@ -734,6 +734,31 @@ function wp_print_media_templates() {
<span><?php _e( 'Random Order' ); ?></span>
<input type="checkbox" data-setting="_orderbyRandom" />
</label>
<label class="setting size">
<span><?php _e( 'Size' ); ?></span>
<select class="size" name="size"
data-setting="size"
<# if ( data.userSettings ) { #>
data-user-setting="imgsize"
<# } #>
>
<?php
// This filter is documented in wp-admin/includes/media.php
$size_names = apply_filters( 'image_size_names_choose', array(
'thumbnail' => __( 'Thumbnail' ),
'medium' => __( 'Medium' ),
'large' => __( 'Large' ),
'full' => __( 'Full Size' ),
) );
foreach ( $size_names as $size => $label ) : ?>
<option value="<?php echo esc_attr( $size ); ?>">
<?php echo esc_html( $label ); ?>
</option>
<?php endforeach; ?>
</select>
</label>
</script>
<script type="text/html" id="tmpl-playlist-settings">