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:
Andrew Nacin 2012-12-06 03:36:17 +00:00
parent f82ed67255
commit dc3a34b19b
2 changed files with 6 additions and 2 deletions

View File

@ -555,7 +555,8 @@
options = {
id: attachment.id,
post_content: attachment.description
post_content: attachment.description,
post_excerpt: caption,
};
if ( props.linkUrl )
@ -563,7 +564,6 @@
if ( 'image' === attachment.type ) {
html = wp.media.string.image( props );
options.post_excerpt = caption;
_.each({
align: 'align',

View File

@ -1751,6 +1751,10 @@ function wp_print_media_templates() {
<# } #>
/>
</label>
<label class="setting" data-setting="caption">
<span><?php _e('Caption'); ?></span>
<textarea {{ maybeReadOnly }}>{{ data.caption }}</textarea>
</label>
<# } #>
<label class="setting" data-setting="description">
<span><?php _e('Description'); ?></span>