The Underscore templates for Gallery settings should respect defaults when marking an <option>
as selected
.
See #28693. git-svn-id: https://develop.svn.wordpress.org/trunk@29283 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
abc6b8c1d7
commit
530328ef59
@ -678,13 +678,15 @@ function wp_print_media_templates() {
|
|||||||
data-user-setting="urlbutton"
|
data-user-setting="urlbutton"
|
||||||
<# } #>>
|
<# } #>>
|
||||||
|
|
||||||
<option value="post" selected>
|
<option value="post" <# if ( ! wp.media.galleryDefaults.link || 'post' == wp.media.galleryDefaults.link ) {
|
||||||
|
#>selected="selected"<# }
|
||||||
|
#>>
|
||||||
<?php esc_attr_e('Attachment Page'); ?>
|
<?php esc_attr_e('Attachment Page'); ?>
|
||||||
</option>
|
</option>
|
||||||
<option value="file">
|
<option value="file" <# if ( 'file' == wp.media.galleryDefaults.link ) { #>selected="selected"<# } #>>
|
||||||
<?php esc_attr_e('Media File'); ?>
|
<?php esc_attr_e('Media File'); ?>
|
||||||
</option>
|
</option>
|
||||||
<option value="none">
|
<option value="none" <# if ( 'none' == wp.media.galleryDefaults.link ) { #>selected="selected"<# } #>>
|
||||||
<?php esc_attr_e('None'); ?>
|
<?php esc_attr_e('None'); ?>
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
@ -695,7 +697,9 @@ function wp_print_media_templates() {
|
|||||||
<select class="columns" name="columns"
|
<select class="columns" name="columns"
|
||||||
data-setting="columns">
|
data-setting="columns">
|
||||||
<?php for ( $i = 1; $i <= 9; $i++ ) : ?>
|
<?php for ( $i = 1; $i <= 9; $i++ ) : ?>
|
||||||
<option value="<?php echo esc_attr( $i ); ?>" <?php selected( $i, 3 ); ?>>
|
<option value="<?php echo esc_attr( $i ); ?>" <#
|
||||||
|
if ( <?php echo $i ?> == wp.media.galleryDefaults.columns ) { #>selected="selected"<# }
|
||||||
|
#>>
|
||||||
<?php echo esc_html( $i ); ?>
|
<?php echo esc_html( $i ); ?>
|
||||||
</option>
|
</option>
|
||||||
<?php endfor; ?>
|
<?php endfor; ?>
|
||||||
|
Loading…
Reference in New Issue
Block a user