Opened 12 years ago
Last modified 6 years ago
#22076 new enhancement
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: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | Upgrade/Install | Keywords: | needs-patch |
Focuses: | 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 (6)
#1
@
12 years ago
- 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
#4
follow-up:
↓ 5
@
11 years ago
Suggestions for how to change this?
We can't just change the 2nd arg from the last plugin to an array of plugins, so I guess we'll probably have to add a 3rd arg for an array of plugins/themes.. not that the existing arg is exactly very useful..
#5
in reply to:
↑ 4
@
11 years ago
Replying to dd32:
Suggestions for how to change this?
We can't just change the 2nd arg from the last plugin to an array of plugins, so I guess we'll probably have to add a 3rd arg for an array of plugins/themes.. not that the existing arg is exactly very useful..
I agree that adding a 3rd argument makes most sense because it will keep backwards compatibility. Perhaps there are some kind of use cases for getting just the last upgraded plugin, so we can just keep this arg.
The same applies to update_bulk_theme_complete_actions