mirror of
git://develop.git.wordpress.org/
synced 2025-02-28 10:33:05 +01:00
Restore captions for non-image attachments. see #22759.
git-svn-id: https://develop.svn.wordpress.org/trunk@23087 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f82ed67255
commit
dc3a34b19b
@ -555,7 +555,8 @@
|
|||||||
|
|
||||||
options = {
|
options = {
|
||||||
id: attachment.id,
|
id: attachment.id,
|
||||||
post_content: attachment.description
|
post_content: attachment.description,
|
||||||
|
post_excerpt: caption,
|
||||||
};
|
};
|
||||||
|
|
||||||
if ( props.linkUrl )
|
if ( props.linkUrl )
|
||||||
@ -563,7 +564,6 @@
|
|||||||
|
|
||||||
if ( 'image' === attachment.type ) {
|
if ( 'image' === attachment.type ) {
|
||||||
html = wp.media.string.image( props );
|
html = wp.media.string.image( props );
|
||||||
options.post_excerpt = caption;
|
|
||||||
|
|
||||||
_.each({
|
_.each({
|
||||||
align: 'align',
|
align: 'align',
|
||||||
|
@ -1751,6 +1751,10 @@ function wp_print_media_templates() {
|
|||||||
<# } #>
|
<# } #>
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
|
<label class="setting" data-setting="caption">
|
||||||
|
<span><?php _e('Caption'); ?></span>
|
||||||
|
<textarea {{ maybeReadOnly }}>{{ data.caption }}</textarea>
|
||||||
|
</label>
|
||||||
<# } #>
|
<# } #>
|
||||||
<label class="setting" data-setting="description">
|
<label class="setting" data-setting="description">
|
||||||
<span><?php _e('Description'); ?></span>
|
<span><?php _e('Description'); ?></span>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user