Make WordPress Core


Ignore:
Timestamp:
06/19/2023 11:18:28 PM (19 months ago)
Author:
peterwilsoncc
Message:

Media: Redirect deprecated wp-admin/media.php file.

Redirect users visiting the wp-admin/media.php file to the media library, wp-admin/upload.php. An user facing warning is displayed when the media library is reached via a deprecated link.

Follow up to [55647].

Props jorbin, audrasjb, azaozz, NekoJonez, kebbet, costdev.
Fixes #57612.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media-template.php

    r55827 r55943  
    374374    <script type="text/html" id="tmpl-attachment-details-two-column">
    375375        <div class="attachment-media-view {{ data.orientation }}">
     376            <?php
     377            if ( isset( $_GET['error'] ) && 'deprecated' === $_GET['error'] ) {
     378                echo '<div id="message" class="error notice"><p>' . __( 'The Edit Media screen is deprecated as of WordPress 6.3. Please use the Media Library instead.' ) . '</p></div>';
     379            }
     380            ?>
    376381            <h2 class="screen-reader-text"><?php /* translators: Hidden accessibility text. */ _e( 'Attachment Preview' ); ?></h2>
    377382            <div class="thumbnail thumbnail-{{ data.type }}">
Note: See TracChangeset for help on using the changeset viewer.