mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Include only valid plugins. Props guillep2k, fixes #6871
git-svn-id: https://develop.svn.wordpress.org/trunk@8495 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -304,14 +304,19 @@ function validate_active_plugins() {
|
||||
return;
|
||||
}
|
||||
|
||||
//Invalid is any plugin that is deactivated due to error.
|
||||
$invalid = array();
|
||||
|
||||
// If a plugin file does not exist, remove it from the list of active
|
||||
// plugins.
|
||||
foreach ( $check_plugins as $check_plugin ) {
|
||||
$result = validate_plugin($check_plugin);
|
||||
if ( is_wp_error( $result ) ) {
|
||||
$invalid[$check_plugin] = $result;
|
||||
deactivate_plugins( $check_plugin, true);
|
||||
}
|
||||
}
|
||||
return $invalid;
|
||||
}
|
||||
|
||||
function validate_plugin($plugin) {
|
||||
|
||||
Reference in New Issue
Block a user