From fd5a7d8a186af23eb661ffbc239ade6d29c3aee7 Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 4 Dec 2008 18:39:11 +0000 Subject: [PATCH] Delete update_plugins when plugins are deleted. Props thinlight. fixes #8451 git-svn-id: http://svn.automattic.com/wordpress/trunk@10038 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/plugin.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index fbb690e0aa..92b46c51e1 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -426,9 +426,12 @@ function delete_plugins($plugins, $redirect = '' ) { $errors[] = $plugin_file; } - if( ! empty($errors) ) + if ( ! empty($errors) ) return new WP_Error('could_not_remove_plugin', sprintf(__('Could not fully remove the plugin(s) %s'), implode(', ', $errors)) ); + // Force refresh of plugin update information + delete_option('update_plugins'); + return true; }