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.

git-svn-id: https://develop.svn.wordpress.org/trunk@11775 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2009-08-04 21:52:31 +00:00
parent b2fce410d1
commit d99cec0a57
1 changed files with 9 additions and 1 deletions

View File

@ -145,6 +145,15 @@ function update_right_now_message() {
echo "<span id='wp-version-message'>$msg</span>";
}
function wp_plugin_update_rows() {
$plugins = get_transient( 'update_plugins' );
$plugins = array_keys( $plugins->response );
foreach( $plugins as $plugin_file ) {
add_action( "after_plugin_row_$plugin_file", 'wp_plugin_update_row', 10, 2 );
}
}
add_action( 'admin_init', 'wp_plugin_update_rows' );
function wp_plugin_update_row( $file, $plugin_data ) {
$current = get_transient( 'update_plugins' );
if ( !isset( $current->response[ $file ] ) )
@ -169,7 +178,6 @@ function wp_plugin_update_row( $file, $plugin_data ) {
echo '</div></td></tr>';
}
add_action( 'after_plugin_row', 'wp_plugin_update_row', 10, 2 );
function wp_update_plugin($plugin, $feedback = '') {