From 4b4f85c2d4a38fcc02a4ff3bf4a834ebaa2fe495 Mon Sep 17 00:00:00 2001 From: westi Date: Wed, 16 Jul 2008 21:53:32 +0000 Subject: [PATCH] Invalidate the plugin update cache if plugins are deleted. Fixes #7304 for trunk. git-svn-id: http://svn.automattic.com/wordpress/trunk@8359 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/update.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wp-includes/update.php b/wp-includes/update.php index 6740e06ff..1cdba0534 100644 --- a/wp-includes/update.php +++ b/wp-includes/update.php @@ -120,6 +120,12 @@ function wp_update_plugins() { $plugin_changed = true; } + foreach ( (array) $current->response as $plugin_file => $update_details ) { + if ( ! isset($plugins[ $plugin_file ]) ) { + $plugin_changed = true; + } + } + // Bail if we've checked in the last 12 hours and if nothing has changed if ( $time_not_changed && !$plugin_changed ) return false; @@ -159,4 +165,4 @@ if ( defined( 'WP_ADMIN' ) && WP_ADMIN ) else add_action( 'init', 'wp_update_plugins' ); -?> \ No newline at end of file +?>