Media: Update in-grid captions.
* Use input fields instead of textboxes (which provide better handling for smaller attachments). * Provide `data-setting` properties to properly sync the changes. see #21390. git-svn-id: http://core.svn.wordpress.org/trunk@22603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9f258e4342
commit
b19d48e7fe
|
@ -603,7 +603,6 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 50px;
|
|
||||||
margin: -1px 0 0;
|
margin: -1px 0 0;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
|
|
@ -1447,19 +1447,17 @@ function wp_print_media_templates( $attachment ) {
|
||||||
</div>
|
</div>
|
||||||
<# if ( data.describe ) { #>
|
<# if ( data.describe ) { #>
|
||||||
<# if ( 'image' === data.type ) { #>
|
<# if ( 'image' === data.type ) { #>
|
||||||
<textarea class="describe"
|
<input type="text" value="{{ data.caption }}" class="describe" data-setting="caption"
|
||||||
placeholder="<?php esc_attr_e('Describe this image…'); ?>"
|
placeholder="<?php esc_attr_e('Describe this image…'); ?>" />
|
||||||
>{{ data.caption }}</textarea>
|
|
||||||
<# } else { #>
|
<# } else { #>
|
||||||
<textarea class="describe"
|
<input type="text" value="{{ data.title }}" class="describe" data-setting="title"
|
||||||
<# if ( 'video' === data.type ) { #>
|
<# if ( 'video' === data.type ) { #>
|
||||||
placeholder="<?php esc_attr_e('Describe this video…'); ?>"
|
placeholder="<?php esc_attr_e('Describe this video…'); ?>"
|
||||||
<# } else if ( 'audio' === data.type ) { #>
|
<# } else if ( 'audio' === data.type ) { #>
|
||||||
placeholder="<?php esc_attr_e('Describe this audio file…'); ?>"
|
placeholder="<?php esc_attr_e('Describe this audio file…'); ?>"
|
||||||
<# } else { #>
|
<# } else { #>
|
||||||
placeholder="<?php esc_attr_e('Describe this media file…'); ?>"
|
placeholder="<?php esc_attr_e('Describe this media file…'); ?>"
|
||||||
<# } #>
|
<# } #> />
|
||||||
>{{ data.title }}</textarea>
|
|
||||||
<# } #>
|
<# } #>
|
||||||
<# } #>
|
<# } #>
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue