From e76bfbefbd43a78cc6cd7c3c0eecded49ef7a545 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 15 May 2014 21:02:04 +0000 Subject: [PATCH] Don't include caption tags in gallery template when there is no caption. props avryl. fixes #28089. git-svn-id: https://develop.svn.wordpress.org/trunk@28442 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/media-template.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/media-template.php b/src/wp-includes/media-template.php index 5418a0a025..65803d4715 100644 --- a/src/wp-includes/media-template.php +++ b/src/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 ) { #>