WordPress.org

Make WordPress Core

Opened 2 months ago

Closed 2 months ago

#53764 closed defect (bug) (fixed)

Remove unused code from media.php file

Reported by: rudlinkon Owned by: hellofromTonya
Milestone: 5.9 Priority: normal
Severity: normal Version: trunk
Component: Media Keywords: has-patch commit
Focuses: coding-standards Cc:

Description

<?php // media_upload_form( $errors ); ?>

I've seen there are two places where the above code is keeping but those codes are commented so not in use.

Repository: wordpress-develop
Branch: master
Line Numbers: 2580 and 2882
File Path: /wp-admin/includes/media.php

Attachments (1)

53764.patch (1.1 KB) - added by rudlinkon 2 months ago.

Download all attachments as: .zip

Change History (6)

@rudlinkon
2 months ago

#1 @rudlinkon
2 months ago

  • Keywords has-patch added

#2 @SergeyBiryukov
2 months ago

  • Component changed from General to Media
  • Keywords has-copy-review removed
  • Milestone changed from Awaiting Review to 5.9

#3 follow-up: @hellofromTonya
2 months ago

  • Keywords commit added
  • Owner set to hellofromTonya
  • Status changed from new to accepted

Hello @rudlinkon,

Welcome to WordPress Core Trac! Thank you for this creating this ticket and submitting a patch.

Both instances were introduced in ticket #5911 with changesets [7043] and [7062] back in 2008. No reasons shared in the ticket or code why they were commented out. I didn't find changesets were they were reverted and made active.

53764.patch looks good to me. Seems safe to remove both. Will mark for commit consideration.

#4 in reply to: ↑ 3 @rudlinkon
2 months ago

Replying to hellofromTonya:

Thank you so much for your kind information @hellofromTonya

Hello @rudlinkon,

Welcome to WordPress Core Trac! Thank you for this creating this ticket and submitting a patch.

Both instances were introduced in ticket #5911 with changesets [7043] and [7062] back in 2008. No reasons shared in the ticket or code why they were commented out. I didn't find changesets were they were reverted and made active.

53764.patch looks good to me. Seems safe to remove both. Will mark for commit consideration.

#5 @SergeyBiryukov
2 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 51484:

Media: Remove unused code from wp-admin/includes/media.php.

Folow-up to [7043], [7062].

Props rudlinkon, hellofromTonya.
Fixes #53764.

Note: See TracTickets for help on using tickets.