Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#34696 closed enhancement (fixed)

Add $args['hook_extra'] to upgrader_source_selection filter

Reported by: afragen Owned by: dd32
Priority: normal Milestone: 4.4
Component: Upgrade/Install Version: 4.4
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

After much discussion with @dd32, regarding the upgrader_source_selection filter it was determined that adding an additional parameter, $args['hook_extra'], would make the filter more useful and result in less overhead than other possible solutions, see #34617 and #34661.

Adding this parameter allows the developer to avoid the use of globals, particularly $plugins or $themes, when trying to determine what is being updated.

As an extra parameter, this should result in no breakage as the additional parameter would be ignored under current use conditions.

Attachments (1)

34696.diff​ (796 bytes ) - added by afragen 11 years ago.

Download all attachments as: .zip

Change History (4)

@afragen
11 years ago

#1 @afragen
11 years ago

  • Keywords has-patch added

#2 @dd32
11 years ago

  • Owner set to dd32
  • Resolution → fixed
  • Status new → closed

In 35642:

Upgrader: Pass the $args['hook_extra'] context to the upgrader_source_selection filter.
Props afragen
Fixes #34696

#3 @dd32
11 years ago

  • Milestone Awaiting Review → 4.4
Note: See TracTickets for help on using tickets.