summaryrefslogtreecommitdiffstats
path: root/wp-admin/includes/media.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-admin/includes/media.php')
-rw-r--r--wp-admin/includes/media.php21
1 files changed, 17 insertions, 4 deletions
diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php
index 3de25dc..6ec4b66 100644
--- a/wp-admin/includes/media.php
+++ b/wp-admin/includes/media.php
@@ -1664,7 +1664,8 @@ function get_media_item( $attachment_id, $args = null ) {
$meta = wp_get_attachment_metadata( $post->ID );
if ( isset( $meta['width'], $meta['height'] ) ) {
- $media_dims .= "<span id='media-dims-$post->ID'>{$meta['width']}&nbsp;&times;&nbsp;{$meta['height']}</span> ";
+ /* translators: 1: A number of pixels wide, 2: A number of pixels tall. */
+ $media_dims .= "<span id='media-dims-$post->ID'>" . sprintf( __( '%1$s by %2$s pixels' ), $meta['width'], $meta['height'] ) . '</span>';
}
/**
@@ -3240,7 +3241,8 @@ function edit_form_image_editor( $post ) {
printf(
/* translators: 1: Link to tutorial, 2: Additional link attributes, 3: Accessibility text. */
__( '<a href="%1$s" %2$s>Learn how to describe the purpose of the image%3$s</a>. Leave empty if the image is purely decorative.' ),
- esc_url( 'https://www.w3.org/WAI/tutorials/images/decision-tree' ),
+ /* translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations. */
+ esc_url( __( 'https://www.w3.org/WAI/tutorials/images/decision-tree/' ) ),
'target="_blank" rel="noopener"',
sprintf(
'<span class="screen-reader-text"> %s</span>',
@@ -3265,7 +3267,14 @@ function edit_form_image_editor( $post ) {
'textarea_name' => 'content',
'textarea_rows' => 5,
'media_buttons' => false,
- 'tinymce' => false,
+ /**
+ * Filters the TinyMCE argument for the media description field on the attachment details screen.
+ *
+ * @since 6.6.0
+ *
+ * @param bool $tinymce Whether to activate TinyMCE in media description field. Default false.
+ */
+ 'tinymce' => apply_filters( 'activate_tinymce_for_media_description', false ),
'quicktags' => $quicktags_settings,
);
@@ -3306,7 +3315,8 @@ function attachment_submitbox_metadata() {
$meta = wp_get_attachment_metadata( $attachment_id );
if ( isset( $meta['width'], $meta['height'] ) ) {
- $media_dims .= "<span id='media-dims-$attachment_id'>{$meta['width']}&nbsp;&times;&nbsp;{$meta['height']}</span> ";
+ /* translators: 1: A number of pixels wide, 2: A number of pixels tall. */
+ $media_dims .= "<span id='media-dims-$attachment_id'>" . sprintf( __( '%1$s by %2$s pixels' ), $meta['width'], $meta['height'] ) . '</span>';
}
/** This filter is documented in wp-admin/includes/media.php */
$media_dims = apply_filters( 'media_meta', $media_dims, $post );
@@ -3441,6 +3451,9 @@ function attachment_submitbox_metadata() {
echo ' ' . strtoupper( esc_html( $meta['bitrate_mode'] ) );
}
break;
+ case 'length_formatted':
+ echo human_readable_duration( $meta['length_formatted'] );
+ break;
default:
echo esc_html( $meta[ $key ] );
break;