WordPress.org

Make WordPress Core

Changeset 10594


Ignore:
Timestamp:
02/19/09 18:39:04 (6 years ago)
Author:
ryan
Message:

Deactivate plugins that don't have valid plugin headers. see #9164

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/plugin.php

    r10393 r10594  
    477477        return new WP_Error('plugin_not_found', __('Plugin file does not exist.')); 
    478478 
     479    $installed_plugins = get_plugins(); 
     480    if ( ! isset($installed_plugins[$plugin]) ) 
     481        return new WP_Error('no_plugin_header', __('The plugin does not have a valid header.')); 
    479482    return 0; 
    480483} 
Note: See TracChangeset for help on using the changeset viewer.