Make WordPress Core


Ignore:
Timestamp:
08/24/2010 07:50:55 PM (14 years ago)
Author:
scribu
Message:

On the plugins page, set and at the right time. See #14579

File:
1 edited

Legend:

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

    r15525 r15527  
    30623062
    30633063    function WP_Plugins_Table() {
     3064        global $status, $page;
     3065
     3066        $default_status = get_user_option( 'plugins_last_view' );
     3067        if ( empty( $default_status ) )
     3068            $default_status = 'all';
     3069        $status = isset( $_REQUEST['plugin_status'] ) ? $_REQUEST['plugin_status'] : $default_status;
     3070        if ( !in_array( $status, array( 'all', 'active', 'inactive', 'recently_activated', 'upgrade', 'network', 'mustuse', 'dropins', 'search' ) ) )
     3071            $status = 'all';
     3072        if ( $status != $default_status && 'search' != $status )
     3073            update_user_meta( get_current_user_id(), 'plugins_last_view', $status );
     3074
     3075        $page = $this->get_pagenum();
     3076
    30643077        parent::WP_List_Table( array(
    30653078            'screen' => 'plugins',
     
    30863099
    30873100        wp_reset_vars( array( 'orderby', 'order', 's' ) );
    3088 
    3089         $page = $this->get_pagenum();
    30903101
    30913102        $plugins = array(
Note: See TracChangeset for help on using the changeset viewer.