author | ymh <ymh.work@gmail.com> |
Mon, 08 Sep 2025 19:44:41 +0200 | |
changeset 23 | 417f20492bf7 |
parent 21 | 48c4eec2b7e6 |
permissions | -rw-r--r-- |
0 | 1 |
<?php |
2 |
/** |
|
3 |
* Media management action handler. |
|
4 |
* |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
5 |
* This file is deprecated, use 'wp-admin/upload.php' instead. |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
6 |
* |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
7 |
* @deprecated 6.3.0 |
0 | 8 |
* @package WordPress |
9 |
* @subpackage Administration |
|
10 |
*/ |
|
11 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
12 |
/** Load WordPress Administration Bootstrap. */ |
16 | 13 |
require_once __DIR__ . '/admin.php'; |
0 | 14 |
|
9 | 15 |
$parent_file = 'upload.php'; |
0 | 16 |
$submenu_file = 'upload.php'; |
17 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
18 |
$action = ! empty( $_REQUEST['action'] ) ? sanitize_text_field( $_REQUEST['action'] ) : ''; |
0 | 19 |
|
5 | 20 |
switch ( $action ) { |
9 | 21 |
case 'editattachment': |
22 |
case 'edit': |
|
23 |
if ( empty( $_GET['attachment_id'] ) ) { |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
24 |
wp_redirect( admin_url( 'upload.php?error=deprecated' ) ); |
16 | 25 |
exit; |
9 | 26 |
} |
27 |
$att_id = (int) $_GET['attachment_id']; |
|
0 | 28 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
29 |
wp_redirect( admin_url( "upload.php?item={$att_id}&error=deprecated" ) ); |
9 | 30 |
exit; |
31 |
||
32 |
default: |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
33 |
wp_redirect( admin_url( 'upload.php?error=deprecated' ) ); |
9 | 34 |
exit; |
5 | 35 |
} |