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
This commit is contained in:
parent
99fd979933
commit
4b4f85c2d4
|
@ -120,6 +120,12 @@ function wp_update_plugins() {
|
||||||
$plugin_changed = true;
|
$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
|
// Bail if we've checked in the last 12 hours and if nothing has changed
|
||||||
if ( $time_not_changed && !$plugin_changed )
|
if ( $time_not_changed && !$plugin_changed )
|
||||||
return false;
|
return false;
|
||||||
|
@ -159,4 +165,4 @@ if ( defined( 'WP_ADMIN' ) && WP_ADMIN )
|
||||||
else
|
else
|
||||||
add_action( 'init', 'wp_update_plugins' );
|
add_action( 'init', 'wp_update_plugins' );
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue