From dc3a34b19b21d36beeb165401c2919bfa96a2503 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 6 Dec 2012 03:36:17 +0000 Subject: [PATCH] Restore captions for non-image attachments. see #22759. git-svn-id: https://develop.svn.wordpress.org/trunk@23087 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/js/media-editor.js | 4 ++-- wp-includes/media.php | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/wp-includes/js/media-editor.js b/wp-includes/js/media-editor.js index d0021be3fd..739747cb67 100644 --- a/wp-includes/js/media-editor.js +++ b/wp-includes/js/media-editor.js @@ -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', diff --git a/wp-includes/media.php b/wp-includes/media.php index 108a2fbd59..b3594f5c8f 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1751,6 +1751,10 @@ function wp_print_media_templates() { <# } #> /> + <# } #>