From d970ac80c6dcb6971bc71df3d1300bd37477a088 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 15 May 2014 21:03:15 +0000 Subject: [PATCH] Don't include caption tags in gallery template when there is no caption. props avryl. fixes #28089. Built from https://develop.svn.wordpress.org/trunk@28442 git-svn-id: http://core.svn.wordpress.org/trunk@28269 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/media-template.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wp-includes/media-template.php b/wp-includes/media-template.php index 5418a0a025..65803d4715 100644 --- a/wp-includes/media-template.php +++ b/wp-includes/media-template.php @@ -980,9 +980,11 @@ function wp_print_media_templates() { <# } #> - + <# if ( attachment.caption.trim() ) { #> + + <# } #> <# if ( index % data.columns === data.columns - 1 ) { #>