Media: Prevent URLs from overflowing their container in the media editor.

This changeset also introduces the `.word-wrap-break-word` class which can be used to apply `word-wrap: break-word` to admin elements when needed.

Props mitogh, costdev, kapilpaul, alamgircsebd, sabernhardt, anantajitjg, afercia, circlecube, SergeyBiryukov, rafiahmedd, audrasjb.
Fixes #55393.

Built from https://develop.svn.wordpress.org/trunk@53777


git-svn-id: http://core.svn.wordpress.org/trunk@53336 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
audrasjb 2022-07-25 18:11:08 +00:00
parent b6fad3a241
commit a85bde79df
7 changed files with 14 additions and 8 deletions

View File

@ -950,6 +950,7 @@ a#remove-post-thumbnail:hover,
padding: 6px 10px 8px; padding: 6px 10px 8px;
} }
.word-wrap-break-word,
.misc-pub-filename { .misc-pub-filename {
word-wrap: break-word; word-wrap: break-word;
} }

File diff suppressed because one or more lines are too long

View File

@ -949,6 +949,7 @@ a#remove-post-thumbnail:hover,
padding: 6px 10px 8px; padding: 6px 10px 8px;
} }
.word-wrap-break-word,
.misc-pub-filename { .misc-pub-filename {
word-wrap: break-word; word-wrap: break-word;
} }

File diff suppressed because one or more lines are too long

View File

@ -3469,7 +3469,7 @@ function attachment_submitbox_metadata() {
if ( ! empty( $meta['original_image'] ) ) { if ( ! empty( $meta['original_image'] ) ) {
?> ?>
<div class="misc-pub-section misc-pub-original-image"> <div class="misc-pub-section misc-pub-original-image word-wrap-break-word">
<?php _e( 'Original image:' ); ?> <?php _e( 'Original image:' ); ?>
<a href="<?php echo esc_url( wp_get_original_image_url( $attachment_id ) ); ?>"> <a href="<?php echo esc_url( wp_get_original_image_url( $attachment_id ) ); ?>">
<?php echo esc_html( wp_basename( wp_get_original_image_path( $attachment_id ) ) ); ?> <?php echo esc_html( wp_basename( wp_get_original_image_path( $attachment_id ) ) ); ?>

View File

@ -438,8 +438,10 @@ function wp_print_media_templates() {
<# } #> <# } #>
<# if ( data.originalImageURL && data.originalImageName ) { #> <# if ( data.originalImageURL && data.originalImageName ) { #>
<?php _e( 'Original image:' ); ?> <div class="word-wrap-break-word">
<a href="{{ data.originalImageURL }}">{{data.originalImageName}}</a> <?php _e( 'Original image:' ); ?>
<a href="{{ data.originalImageURL }}">{{data.originalImageName}}</a>
</div>
<# } #> <# } #>
<# } #> <# } #>
@ -661,8 +663,10 @@ function wp_print_media_templates() {
<# } #> <# } #>
<# if ( data.originalImageURL && data.originalImageName ) { #> <# if ( data.originalImageURL && data.originalImageName ) { #>
<?php _e( 'Original image:' ); ?> <div class="word-wrap-break-word">
<a href="{{ data.originalImageURL }}">{{data.originalImageName}}</a> <?php _e( 'Original image:' ); ?>
<a href="{{ data.originalImageURL }}">{{data.originalImageName}}</a>
</div>
<# } #> <# } #>
<# if ( data.can.save && data.sizes ) { #> <# if ( data.can.save && data.sizes ) { #>

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.1-alpha-53776'; $wp_version = '6.1-alpha-53777';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.