Changeset 55943
- Timestamp:
- 06/19/2023 11:18:28 PM (15 months ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/media.php
r55647 r55943 10 10 */ 11 11 12 _deprecated_file( basename( __FILE__ ), '6.3.0', 'wp-admin/upload.php' ); 12 /** Load WordPress Administration Bootstrap. */ 13 require_once __DIR__ . '/admin.php'; 14 15 $parent_file = 'upload.php'; 16 $submenu_file = 'upload.php'; 17 18 wp_reset_vars( array( 'action' ) ); 19 20 switch ( $action ) { 21 case 'editattachment': 22 case 'edit': 23 if ( empty( $_GET['attachment_id'] ) ) { 24 wp_redirect( admin_url( 'upload.php?error=deprecated' ) ); 25 exit; 26 } 27 $att_id = (int) $_GET['attachment_id']; 28 29 wp_redirect( admin_url( "upload.php?item={$att_id}&error=deprecated" ) ); 30 exit; 31 32 default: 33 wp_redirect( admin_url( 'upload.php?error=deprecated' ) ); 34 exit; 35 } -
trunk/src/wp-admin/upload.php
r55631 r55943 142 142 wp_enqueue_script( 'media' ); 143 143 144 remove_action( 'admin_head', 'wp_admin_canonical_url' ); 144 // Remove the error parameter added by deprecation of wp-admin/media.php. 145 add_filter( 146 'removable_query_args', 147 function() { 148 return array( 'error' ); 149 }, 150 10, 151 0 152 ); 145 153 146 154 $q = $_GET; -
trunk/src/wp-includes/media-template.php
r55827 r55943 374 374 <script type="text/html" id="tmpl-attachment-details-two-column"> 375 375 <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 ?> 376 381 <h2 class="screen-reader-text"><?php /* translators: Hidden accessibility text. */ _e( 'Attachment Preview' ); ?></h2> 377 382 <div class="thumbnail thumbnail-{{ data.type }}">
Note: See TracChangeset
for help on using the changeset viewer.