From 5b2a4bb837b8ef579cef780afb8b617198718e7f Mon Sep 17 00:00:00 2001 From: Peter Westwood 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: https://develop.svn.wordpress.org/trunk@8359 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 6740e06ff5..1cdba0534a 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 +?>