1<?php
2/**
3 * Media management action handler.
4 *
5 * This file is deprecated, use 'wp-admin/upload.php' instead.
6 *
7 * @deprecated 6.3.0
8 * @package WordPress
9 * @subpackage Administration
10 */
11
12/** Load WordPress Administration Bootstrap. */
13require_once __DIR__ . '/admin.php';
14
15$parent_file = 'upload.php';
16$submenu_file = 'upload.php';
17
18$action = ! empty( $_REQUEST['action'] ) ? sanitize_text_field( $_REQUEST['action'] ) : '';
19
20switch ( $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}
36