Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#55170 closed enhancement (fixed)

Remove commented code from remove_user_from_blog()

Reported by: faison's profile Faison Owned by: audrasjb's profile audrasjb
Milestone: 6.0 Priority: normal
Severity: normal Version:
Component: Networks and Sites Keywords: has-patch
Focuses: docs, multisite, coding-standards Cc:

Description

The function remove_user_from_blog() contains a commented out call to the function wp_revoke_user() (See source:/trunk/src/wp-includes/ms-functions.php#L283.

This commented line exists as far back as 2011 (see changeset:17379), and the only update to that line since then has been to update its code style (see changeset:47122).

Attachments (1)

55170.diff (418 bytes) - added by Faison 2 years ago.

Download all attachments as: .zip

Change History (6)

@Faison
2 years ago

#1 @audrasjb
2 years ago

  • Component changed from General to Networks and Sites
  • Focuses docs multisite added
  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 6.0
  • Owner set to audrasjb
  • Status changed from new to reviewing
  • Version trunk deleted

#2 @azouamauriac
2 years ago

  • Focuses coding-standards added

Hello there thanks for your report. It makes sens I think. Focuses as coding-standards because I think it is good practice to not let commented code in production.

#3 @audrasjb
2 years ago

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

In 52737:

Networks and Sites: Remove unnecessary commented code from remove_user_from_blog().

This change removes a call to wp_revoke_user() from remove_user_from_blog(): this line has been commented out since forever.

Props Faison.
Fixes #55170.

#4 @SergeyBiryukov
2 years ago

Some history here:

#5 @audrasjb
2 years ago

Wow, thanks for retrieving the full history. I stopped when I reached @since mu-3.0.0 😍

This research deserves a late props (and missing props actually added manually) 😃

Note: See TracTickets for help on using tickets.