Make WordPress Core

Changeset 11775


Ignore:
Timestamp:
08/04/2009 09:52:31 PM (17 years ago)
Author:
westi
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/update.php

    r11517 r11775  
    146146}
    147147
     148function wp_plugin_update_rows() {
     149        $plugins = get_transient( 'update_plugins' );
     150        $plugins = array_keys( $plugins->response );
     151        foreach( $plugins as $plugin_file ) {
     152                add_action( "after_plugin_row_$plugin_file", 'wp_plugin_update_row', 10, 2 );
     153        }
     154}
     155add_action( 'admin_init', 'wp_plugin_update_rows' );
     156
    148157function wp_plugin_update_row( $file, $plugin_data ) {
    149158        $current = get_transient( 'update_plugins' );
    … …  
    170179        echo '</div></td></tr>';
    171180}
    172 add_action( 'after_plugin_row', 'wp_plugin_update_row', 10, 2 );
    173181
    174182function wp_update_plugin($plugin, $feedback = '') {
Note: See TracChangeset for help on using the changeset viewer.