#10464 closed enhancement (fixed)
enhancement for after_plugin_row hook
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 2.9 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Plugins | Keywords: | plugins, administration, has-patch |
| Focuses: | Cc: |
Description
In 2.7 we added a new hook: after_plugin_row_$plugin_file
after_plugin_row fires after every single plugin row.
after_plugin_row_$plugin_file only fires after the particular plugin that matches $plugin_file.
WordPress Core still uses the older of the two, which is inefficient, and less flexible.
This patch change core so it uses the "_$plugin_file" version of the hooks when doing standard plugin update notices. This has two advantages:
1) More efficient. The hook only actually fires if a plugin has an update, instead of firing once for every single plugin.
2) It's now possible for plugins to manipulate the notice for a particular plugin (for example, a plugin might have reason to suppress or replace its own update notice). Previously only *all* notices can be turned off of changed -- not on a plugin by plugin basis.
It's a straightforward change. Somebody please commit this -- I could really use it for a "3rd-party update checker" I'm trying to put together.
(In [11775]) Move plugin update notice output to the plugin specific hook so as to make them easier to filter and manage from plugins that want to do there own thing. Fixes #10464 props strider72.