Media
upload.php (Media Library)
- URL:
/wp-admin/upload.php - Capability required:
upload_files(anddelete_postfor deleting attachments). - What it does: Lists media items, handles bulk actions, and provides entry points to edit attachments.
- Key hooks:
handle_bulk_actions-{$screen}.
media.php (Deprecated media handler)
- URL:
/wp-admin/media.php - Capability required: None in file; defers to
upload.phpand will redirect. - What it does: Deprecated action handler that redirects to
upload.phpfor attachment editing. - Key hooks: (none in file).
media-new.php (Add New Media)
- URL:
/wp-admin/media-new.php - Capability required:
upload_files(andedit_postif attaching to a post). - What it does: Uploads new media (plupload or browser uploader) and redirects to the Media Library.
- Key hooks: (none in file; standard admin header/footer hooks apply).
async-upload.php (Async upload handler)
- URL:
/wp-admin/async-upload.php - Capability required:
upload_files(andedit_postwhen attaching to a post). - What it does: Handles async uploads from Plupload or legacy uploaders, returns attachment HTML or ID.
- Key hooks:
async_upload_{$type}.