Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#28111 closed defect (bug) (fixed)

delete_plugins() $redirect argument unused

Reported by: jdgrimes's profile jdgrimes Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.0 Priority: normal
Severity: normal Version: 2.6
Component: Plugins Keywords: has-patch commit
Focuses: Cc:

Description

The second argument for delete_plugins() ($redirect), has been unused since the function was introduced in [8049]. Apparently it was unnecessarily inherited from its forerunners.

Attachments (3)

remove-unused-arg.patch (525 bytes) - added by jdgrimes 10 years ago.
28111.patch (844 bytes) - added by jdgrimes 10 years ago.
Deprecate the $redirect argument
28111.2.patch (1.4 KB) - added by SergeyBiryukov 10 years ago.

Download all attachments as: .zip

Change History (9)

#1 @jdgrimes
10 years ago

  • Keywords has-patch added

#2 in reply to: ↑ description @eiffel666333
10 years ago

Replying to jdgrimes:

The second argument for delete_plugins() ($redirect), has been unused since the function was introduced in [8049]. Apparently it was unnecessarily inherited from its forerunners.

#3 follow-up: @SergeyBiryukov
10 years ago

  • Milestone changed from Awaiting Review to 4.0

We should probably deprecate it (like in [27162]), in case we ever need to add another argument here.

@jdgrimes
10 years ago

Deprecate the $redirect argument

#4 in reply to: ↑ 3 @jdgrimes
10 years ago

Replying to SergeyBiryukov:

We should probably deprecate it (like in [27162]), in case we ever need to add another argument here.

28111.patch deprecates the argument. I included a call to _deprecated_argument() if $redirect is passed, though this wasn't done for [27162].

#5 @SergeyBiryukov
10 years ago

  • Keywords commit added

_deprecated_argument() is probably not necessary here.

28111.2.patch also contains some PHPDoc fixes and additions.

#6 @SergeyBiryukov
10 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 28256:

Deprecate unused argument of delete_plugins(). Clarify @return value.

props jdgrimes for initial patch.
fixes #28111.

Note: See TracTickets for help on using tickets.