summaryrefslogtreecommitdiffstats
path: root/wp-admin/media.php
blob: 5b7ac353c694b4e30447f2dfe698a7f66f8b917f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/**
 * Media management action handler.
 *
 * This file is deprecated, use 'wp-admin/upload.php' instead.
 *
 * @deprecated 6.3.0
 * @package WordPress
 * @subpackage Administration
 */

/** Load WordPress Administration Bootstrap. */
require_once __DIR__ . '/admin.php';

$parent_file  = 'upload.php';
$submenu_file = 'upload.php';

wp_reset_vars( array( 'action' ) );

switch ( $action ) {
	case 'editattachment':
	case 'edit':
		if ( empty( $_GET['attachment_id'] ) ) {
			wp_redirect( admin_url( 'upload.php?error=deprecated' ) );
			exit;
		}
		$att_id = (int) $_GET['attachment_id'];

		wp_redirect( admin_url( "upload.php?item={$att_id}&error=deprecated" ) );
		exit;

	default:
		wp_redirect( admin_url( 'upload.php?error=deprecated' ) );
		exit;
}