Make WordPress Core

Changeset 9271


Ignore:
Timestamp:
10/21/2008 11:55:58 PM (16 years ago)
Author:
ryan
Message:

Allow FILE to be passed to activate_plugin()/deactivate_plugin(). Props DD32. fixes #7878

File:
1 edited

Legend:

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

    r9249 r9271  
    216216function activate_plugin($plugin, $redirect = '') {
    217217    $current = get_option('active_plugins');
    218     $plugin = trim($plugin);
     218    $plugin = plugin_basename(trim($plugin));
    219219
    220220    $valid = validate_plugin($plugin);
     
    255255
    256256    foreach ( $plugins as $plugin ) {
     257        $plugin = plugin_basename($plugin);
    257258        if( ! is_plugin_active($plugin) )
    258259            continue;
Note: See TracChangeset for help on using the changeset viewer.