CoreFiles by mySites.guru
media.php35 lines, 819 bytes, from wordpress-7.1.4.zip
Raw History Compare with 7.1.3
md5
4b89b5e985d046092b7d29403ecb42fd
sha1
3457ed36df60137b6df529f7fab8e92a57ff3e52
sha256
f6fcf282df3a7143660c99d77e8ab2d0f011ca7c35534e1fb160cdde74d37cfd
<?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';

$action = ! empty( $_REQUEST['action'] ) ? sanitize_text_field( $_REQUEST['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;
}

The same content is in 129 releases, WordPress 6.6-beta1 to 7.2-beta5. See them all, or every version of this file.