WordPress.org

Make WordPress Core

Changeset 7488


Ignore:
Timestamp:
03/23/08 16:36:05 (7 years ago)
Author:
ryan
Message:

Use is_plugin_active() and remove double searching. Props DD32. fixes #6332

File:
1 edited

Legend:

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

    r7465 r7488  
    123123 
    124124    foreach ( $plugins as $plugin ) { 
    125         $item = array_search( $plugin, $current); 
    126         if( false === $item) 
     125        if( ! is_plugin_active($plugin) ) 
    127126            continue; 
    128         if ( ( $key = array_search( $plugin, $current) ) !== false ) 
    129             array_splice($current, $key, 1 ); // Fixed Array-fu! 
    130         if ( ! $silent ) 
     127        array_splice($current, array_search( $plugin, $current), 1 ); // Fixed Array-fu! 
     128        if ( ! $silent ) //Used by Plugin updater to internally deactivate plugin, however, not to notify plugins of the fact to prevent plugin output. 
    131129            do_action('deactivate_' . trim( $plugin )); 
    132130    } 
Note: See TracChangeset for help on using the changeset viewer.