kollapsminoriteten/wp-admin/media.php

36 lines
819 B
PHP
Raw Permalink Normal View History

2019-11-02 10:38:58 +01:00
<?php
/**
* Media management action handler.
*
2023-09-26 10:33:34 +02:00
* This file is deprecated, use 'wp-admin/upload.php' instead.
*
* @deprecated 6.3.0
2019-11-02 10:38:58 +01:00
* @package WordPress
* @subpackage Administration
*/
2023-09-26 10:33:34 +02:00
/** Load WordPress Administration Bootstrap. */
2020-05-06 17:23:38 +02:00
require_once __DIR__ . '/admin.php';
2019-11-02 10:38:58 +01:00
$parent_file = 'upload.php';
$submenu_file = 'upload.php';
2025-02-28 08:42:11 +01:00
$action = ! empty( $_REQUEST['action'] ) ? sanitize_text_field( $_REQUEST['action'] ) : '';
2019-11-02 10:38:58 +01:00
switch ( $action ) {
case 'editattachment':
case 'edit':
if ( empty( $_GET['attachment_id'] ) ) {
2023-09-26 10:33:34 +02:00
wp_redirect( admin_url( 'upload.php?error=deprecated' ) );
2020-09-15 14:29:22 +02:00
exit;
2019-11-02 10:38:58 +01:00
}
$att_id = (int) $_GET['attachment_id'];
2023-09-26 10:33:34 +02:00
wp_redirect( admin_url( "upload.php?item={$att_id}&error=deprecated" ) );
2019-11-02 10:38:58 +01:00
exit;
default:
2023-09-26 10:33:34 +02:00
wp_redirect( admin_url( 'upload.php?error=deprecated' ) );
2019-11-02 10:38:58 +01:00
exit;
}