WordPress.org

Make WordPress Core

Changeset 15525


Ignore:
Timestamp:
08/23/10 21:31:42 (4 years ago)
Author:
scribu
Message:

Fix Recently Active plugins screen. See #14579

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/default-list-tables.php

    r15524 r15525  
    30943094            'active' => array(), 
    30953095            'inactive' => array(), 
    3096             'recent' => array(), 
    3097             'recently_activated' => get_option( 'recently_activated', array() ), 
     3096            'recently_activated' => array(), 
    30983097            'upgrade' => array(), 
    30993098            'mustuse' => array(), 
     
    31103109        set_transient( 'plugin_slugs', array_keys( $plugins['all'] ), 86400 ); 
    31113110 
    3112         // Clean out any plugins which were deactivated over a week ago. 
    3113         foreach ( $plugins['recently_activated'] as $key => $time ) 
    3114             if ( $time + ( 7*24*60*60 ) < time() ) //1 week 
    3115                 unset( $plugins['recently_activated'][$key] ); 
    3116         update_option( 'recently_activated', $plugins['recently_activated'] ); 
     3111        $recently_activated = get_option( 'recently_activated', array() ); 
     3112 
     3113        $one_week = 7*24*60*60; 
     3114        foreach ( $recently_activated as $key => $time ) 
     3115            if ( $time + $one_week < time() ) 
     3116                unset( $recently_activated[$key] ); 
     3117        update_option( 'recently_activated', $recently_activated ); 
     3118 
    31173119        $current = get_site_transient( 'update_plugins' ); 
    31183120 
     
    31353137            } else { 
    31363138                if ( !is_network_admin() && isset( $recently_activated[ $plugin_file ] ) ) // Was the plugin recently activated? 
    3137                     $plugins['recent'][ $plugin_file ] = $plugin_data; 
     3139                    $plugins['recently_activated'][ $plugin_file ] = $plugin_data; 
    31383140                $plugins['inactive'][ $plugin_file ] = $plugin_data; 
    31393141            } 
Note: See TracChangeset for help on using the changeset viewer.