Make WordPress Core

Changeset 53777


Ignore:
Timestamp:
07/25/2022 06:09:26 PM (2 years ago)
Author:
audrasjb
Message:

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.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/common.css

    r53717 r53777  
    950950}
    951951
     952.word-wrap-break-word,
    952953.misc-pub-filename {
    953954    word-wrap: break-word;
  • trunk/src/wp-admin/includes/media.php

    r53768 r53777  
    34703470    if ( ! empty( $meta['original_image'] ) ) {
    34713471        ?>
    3472         <div class="misc-pub-section misc-pub-original-image">
     3472        <div class="misc-pub-section misc-pub-original-image word-wrap-break-word">
    34733473            <?php _e( 'Original image:' ); ?>
    34743474            <a href="<?php echo esc_url( wp_get_original_image_url( $attachment_id ) ); ?>">
  • trunk/src/wp-includes/media-template.php

    r52196 r53777  
    439439
    440440                    <# if ( data.originalImageURL && data.originalImageName ) { #>
    441                         <?php _e( 'Original image:' ); ?>
    442                         <a href="{{ data.originalImageURL }}">{{data.originalImageName}}</a>
     441                        <div class="word-wrap-break-word">
     442                            <?php _e( 'Original image:' ); ?>
     443                            <a href="{{ data.originalImageURL }}">{{data.originalImageName}}</a>
     444                        </div>
    443445                    <# } #>
    444446                <# } #>
     
    662664
    663665                    <# if ( data.originalImageURL && data.originalImageName ) { #>
    664                         <?php _e( 'Original image:' ); ?>
    665                         <a href="{{ data.originalImageURL }}">{{data.originalImageName}}</a>
     666                        <div class="word-wrap-break-word">
     667                            <?php _e( 'Original image:' ); ?>
     668                            <a href="{{ data.originalImageURL }}">{{data.originalImageName}}</a>
     669                        </div>
    666670                    <# } #>
    667671
Note: See TracChangeset for help on using the changeset viewer.