Make WordPress Core


Ignore:
Timestamp:
05/15/2014 09:02:04 PM (12 years ago)
Author:
SergeyBiryukov
Message:

Don't include caption tags in gallery template when there is no caption.

props avryl.
fixes #28089.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media-template.php

    r28369 r28442  
    981981                                                        <# } #>
    982982                                                </dt>
    983                                                 <dd class="wp-caption-text gallery-caption">
    984                                                         {{ attachment.caption }}
    985                                                 </dd>
     983                                                <# if ( attachment.caption.trim() ) { #>
     984                                                        <dd class="wp-caption-text gallery-caption">
     985                                                                {{ attachment.caption }}
     986                                                        </dd>
     987                                                <# } #>
    986988                                        </dl>
    987989                                        <# if ( index % data.columns === data.columns - 1 ) { #>
Note: See TracChangeset for help on using the changeset viewer.