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: http://svn.automattic.com/wordpress/trunk@11775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2009-08-04 21:52:31 +00:00
parent d74205ae0a
commit 32f63b12b7
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 = '') {