Skip to content

Commit a1aa783

Browse files
authored
Merge branch 'WordPress:trunk' into trunk
2 parents 0cf9dc4 + cec8718 commit a1aa783

2 files changed

Lines changed: 19 additions & 3 deletions

File tree

src/wp-admin/includes/media.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3274,7 +3274,15 @@ function edit_form_image_editor( $post ) {
32743274
<?php endif; ?>
32753275

32763276
<p>
3277-
<label for="attachment_caption"><strong><?php _e( 'Caption' ); ?></strong></label><br />
3277+
<label for="attachment_caption"><strong>
3278+
<?php
3279+
if ( wp_attachment_is( 'image', $post ) ) {
3280+
esc_html_e( 'Image Caption' );
3281+
} else {
3282+
esc_html_e( 'Short Description' );
3283+
}
3284+
?>
3285+
</strong></label><br />
32783286
<textarea class="widefat" name="excerpt" id="attachment_caption"><?php echo $post->post_excerpt; ?></textarea>
32793287
</p>
32803288

src/wp-includes/media-template.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,11 @@ function wp_print_media_templates() {
544544
<?php endforeach; ?>
545545
<# } #>
546546
<span class="setting" data-setting="caption">
547-
<label for="attachment-details-two-column-caption" class="name"><?php _e( 'Caption' ); ?></label>
547+
<# if ( 'image' === data.type ) { #>
548+
<label for="attachment-details-two-column-caption" class="name"><?php esc_html_e( 'Image Caption' ); ?></label>
549+
<# } else { #>
550+
<label for="attachment-details-two-column-caption" class="name"><?php esc_html_e( 'Short Description' ); ?></label>
551+
<# } #>
548552
<textarea id="attachment-details-two-column-caption" {{ maybeReadOnly }}>{{ data.caption }}</textarea>
549553
</span>
550554
<span class="setting" data-setting="description">
@@ -796,7 +800,11 @@ function wp_print_media_templates() {
796800
<?php endforeach; ?>
797801
<# } #>
798802
<span class="setting" data-setting="caption">
799-
<label for="attachment-details-caption" class="name"><?php _e( 'Caption' ); ?></label>
803+
<# if ( 'image' === data.type ) { #>
804+
<label for="attachment-details-caption" class="name"><?php esc_html_e( 'Image Caption' ); ?></label>
805+
<# } else { #>
806+
<label for="attachment-details-caption" class="name"><?php esc_html_e( 'Short Description' ); ?></label>
807+
<# } #>
800808
<textarea id="attachment-details-caption" {{ maybeReadOnly }}>{{ data.caption }}</textarea>
801809
</span>
802810
<span class="setting" data-setting="description">

0 commit comments

Comments
 (0)