Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#10464 closed enhancement (fixed)

enhancement for after_plugin_row hook

Reported by: strider72 Owned by:
Milestone: 2.9 Priority: normal
Severity: normal Version:
Component: Plugins Keywords: plugins, administration, has-patch
Focuses: Cc:


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.

Attachments (1)

plugin_update_rows_patch.diff (922 bytes) - added by strider72 11 years ago.

Download all attachments as: .zip

Change History (4)

#1 @westi
11 years ago

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

(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.

#2 @azaozz
11 years ago

(In [11785]) Fix warnings in wp_plugin_update_rows(), see #10464

#3 @Denis-de-Bernardy
11 years ago

  • Milestone changed from 2.8.4 to 2.9
Note: See TracTickets for help on using tickets.