Opened 3 years ago
Closed 3 years ago
#60103 closed defect (bug) (wontfix)
Unused $body_id variable on the media-upload.php file.
| Reported by: | upadalavipul | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Media | Version: | |
| Severity: | normal | Keywords: | close |
| Cc: | Focuses: | administration, coding-standards |
Description
I have reviewed the media.php file code and found the $body_id variable is unused. So I think as per the coding standard we need to remove the $body_id variable here.
files: wp-admin/media-upload.php
Attachments (1)
Change History (3)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi there, thanks for the patch!
The
$body_idglobal is used inwp_iframe()andiframe_header().wp_media_upload_handler()callswp_iframe()withmedia_upload_type_form()as a callback printing the content, which in turn loads themedia-upload.phpfile where$body_idis defined.These are legacy media functions, but they are still kept for backward compatibility, so I don't think the
$body_idglobal should be removed, as that might cause unnecessary breakage.