Skip to content

Commit b4a862d

Browse files
Media: Update caption label to differentiate between video descriptions and image captions
1 parent 8270db8 commit b4a862d

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

src/wp-admin/includes/media.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3274,7 +3274,17 @@ 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 ( str_starts_with( $post->post_mime_type, 'video' ) ) {
3280+
_e( 'Video Description' );
3281+
} elseif ( str_starts_with( $post->post_mime_type, 'image' ) ) {
3282+
_e( 'Image Caption' );
3283+
} else {
3284+
_e( 'Caption' );
3285+
}
3286+
?>
3287+
</strong></label><br />
32783288
<textarea class="widefat" name="excerpt" id="attachment_caption"><?php echo $post->post_excerpt; ?></textarea>
32793289
</p>
32803290

0 commit comments

Comments
 (0)