Restore captions for non-image attachments. see #22759.

git-svn-id: http://core.svn.wordpress.org/trunk@23087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-12-06 03:36:17 +00:00
parent 8efc323e2e
commit e09094434e
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>