Opened 8 months ago

Last modified 8 months ago

#22076 new defect (bug)

WP Upgrader: update_bulk_plugins_complete_actions and update_bulk_theme_complete_actions should pass information about all plugins/themes to the filter

Reported by: ragulka Owned by:
Priority: normal Milestone: Awaiting Review
Component: Upgrade/Install Version: 3.0
Severity: normal Keywords: needs-patch
Cc:

Description

In class-wp-upgrader.php, line 1214 there is this line:

$update_actions = apply_filters('update_plugin_complete_actions', $update_actions, $this->plugin);

When adding a filter to it like this:

add_filter('update_bulk_plugins_complete_actions','test_filter',99,2);

function test_filter( $update_actions, $plugins ) {
    echo print_r( $plugins, 1);
    return $update_actions;
}

Only the last updated plugin info will be printed. However, it should contain information about all the plugins that were updated (since we are dealing with a bulk upgrade here).

Change History (3)

  • Summary changed from WP Upgrader: update_bulk_plugins_complete_actions should pass information about all plugins to the filter to WP Upgrader: update_bulk_plugins_complete_actions and update_bulk_theme_complete_actions should pass information about all plugins/themes to the filter
  • Version changed from 3.4.2 to trunk

The same applies to update_bulk_theme_complete_actions

  • Version changed from trunk to 3.0

Confirmed. The actions were added in [14879] (for #11232).

Note: See TracTickets for help on using tickets.