[wp-trac] [WordPress Trac] #60103: Unused $body_id variable on the media-upload.php file.
WordPress Trac
noreply at wordpress.org
Tue Dec 19 12:38:42 UTC 2023
#60103: Unused $body_id variable on the media-upload.php file.
--------------------------+-----------------------------------------------
Reporter: upadalavipul | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version:
Severity: normal | Resolution:
Keywords: close | Focuses: administration, coding-standards
--------------------------+-----------------------------------------------
Changes (by SergeyBiryukov):
* keywords: => close
* focuses: coding-standards => administration, coding-standards
* component: General => Media
Comment:
Hi there, thanks for the patch!
The `$body_id` global is used in `wp_iframe()` and `iframe_header()`.
`wp_media_upload_handler()` calls `wp_iframe()` with
`media_upload_type_form()` as a callback printing the content, which in
turn loads the `media-upload.php` file where `$body_id` is defined.
These are legacy media functions, but they are still kept for backward
compatibility, so I don't think the `$body_id` global should be removed,
as that might cause unnecessary breakage.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60103#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list