Make WordPress Core

Ticket #28085: 28085.patch

File 28085.patch, 19.6 KB (added by juliobox, 11 years ago)

Patch to add a new view to plugins' list

  • includes/class-wp-plugins-list-table.php

     
    1818                ) );
    1919
    2020                $status = 'all';
    21                 if ( isset( $_REQUEST['plugin_status'] ) && in_array( $_REQUEST['plugin_status'], array( 'active', 'inactive', 'recently_activated', 'upgrade', 'mustuse', 'dropins', 'search' ) ) )
     21                if ( isset( $_REQUEST['plugin_status'] ) && in_array( $_REQUEST['plugin_status'], array( 'active', 'inactive', 'recently_activated', 'recently_updated', 'upgrade', 'mustuse', 'dropins', 'search' ) ) ) {
    2222                        $status = $_REQUEST['plugin_status'];
     23                }
    2324
    24                 if ( isset($_REQUEST['s']) )
    25                         $_SERVER['REQUEST_URI'] = add_query_arg('s', wp_unslash($_REQUEST['s']) );
     25                if ( isset( $_REQUEST['s'] ) ) {
     26                        $_SERVER['REQUEST_URI'] = add_query_arg( 's', wp_unslash( $_REQUEST['s'] ) );
     27                }
    2628
    2729                $page = $this->get_pagenum();
    2830        }
     
    5557                        'active' => array(),
    5658                        'inactive' => array(),
    5759                        'recently_activated' => array(),
     60                        'recently_updated' => array(),
    5861                        'upgrade' => array(),
    5962                        'mustuse' => array(),
    6063                        'dropins' => array()
     
    8487                        }
    8588
    8689                        /** This action is documented in wp-admin/includes/class-wp-plugins-list-table.php */
    87                         if ( apply_filters( 'show_advanced_plugins', true, 'dropins' ) )
     90                        if ( apply_filters( 'show_advanced_plugins', true, 'dropins' ) ) {
    8891                                $plugins['dropins'] = get_dropins();
     92                        }
    8993
    9094                        if ( current_user_can( 'update_plugins' ) ) {
    9195                                $current = get_site_transient( 'update_plugins' );
     
    103107                if ( ! $screen->in_admin( 'network' ) ) {
    104108                        $recently_activated = get_option( 'recently_activated', array() );
    105109
    106                         foreach ( $recently_activated as $key => $time )
    107                                 if ( $time + WEEK_IN_SECONDS < time() )
     110                        foreach ( $recently_activated as $key => $time ) {
     111                                if ( $time + WEEK_IN_SECONDS < time() ) {
    108112                                        unset( $recently_activated[$key] );
     113                                }
     114                        }
    109115                        update_option( 'recently_activated', $recently_activated );
     116
     117                        $recently_updated = get_option( 'recently_updated', array() );
     118
     119                        foreach ( $recently_updated as $key => $time ) {
     120                                if ( $time + WEEK_IN_SECONDS < time() ) {
     121                                        unset( $recently_updated[$key] );
     122                                }
     123                        }
     124                        update_option( 'recently_updated', $recently_updated );
    110125                }
    111126
    112127                foreach ( (array) $plugins['all'] as $plugin_file => $plugin_data ) {
     
    127142                                        // On the non-network screen, populate the recently activated list with plugins that have been recently activated
    128143                                        $plugins['recently_activated'][ $plugin_file ] = $plugin_data;
    129144                                }
     145                                if ( ! $screen->in_admin( 'network' ) && isset( $recently_updated[ $plugin_file ] ) ) {
     146                                        // On the non-network screen, populate the recently updated list with plugins that have been recently updated
     147                                        $plugins['recently_updated'][ $plugin_file ] = $plugin_data;
     148                                }
    130149                                // Populate the inactive list with plugins that aren't activated
    131150                                $plugins['inactive'][ $plugin_file ] = $plugin_data;
    132151                        }
     
    138157                }
    139158
    140159                $totals = array();
    141                 foreach ( $plugins as $type => $list )
     160                foreach ( $plugins as $type => $list ) {
    142161                        $totals[ $type ] = count( $list );
     162                }
    143163
    144                 if ( empty( $plugins[ $status ] ) && !in_array( $status, array( 'all', 'search' ) ) )
     164                if ( empty( $plugins[ $status ] ) && ! in_array( $status, array( 'all', 'search' ) ) ) {
    145165                        $status = 'all';
     166                }
    146167
    147168                $this->items = array();
    148169                foreach ( $plugins[ $status ] as $plugin_file => $plugin_data ) {
    149170                        // Translate, Don't Apply Markup, Sanitize HTML
    150                         $this->items[$plugin_file] = _get_plugin_data_markup_translate( $plugin_file, $plugin_data, false, true );
     171                        $this->items[ $plugin_file ] = _get_plugin_data_markup_translate( $plugin_file, $plugin_data, false, true );
    151172                }
    152173
    153174                $total_this_page = $totals[ $status ];
     
    163184
    164185                $start = ( $page - 1 ) * $plugins_per_page;
    165186
    166                 if ( $total_this_page > $plugins_per_page )
     187                if ( $total_this_page > $plugins_per_page ) {
    167188                        $this->items = array_slice( $this->items, $start, $plugins_per_page );
     189                }
    168190
    169191                $this->set_pagination_args( array(
    170192                        'total_items' => $total_this_page,
     
    174196
    175197        function _search_callback( $plugin ) {
    176198                static $term;
    177                 if ( is_null( $term ) )
     199                if ( is_null( $term ) ) {
    178200                        $term = wp_unslash( $_REQUEST['s'] );
     201                }
    179202
    180203                foreach ( $plugin as $value ) {
    181204                        if ( false !== stripos( strip_tags( $value ), $term ) ) {
     
    189212        function _order_callback( $plugin_a, $plugin_b ) {
    190213                global $orderby, $order;
    191214
    192                 $a = $plugin_a[$orderby];
    193                 $b = $plugin_b[$orderby];
     215                $a = $plugin_a[ $orderby ];
     216                $b = $plugin_b[ $orderby ];
    194217
    195                 if ( $a == $b )
     218                if ( $a == $b ) {
    196219                        return 0;
     220                }
    197221
    198                 if ( 'DESC' == $order )
     222                if ( 'DESC' == $order ) {
    199223                        return ( $a < $b ) ? 1 : -1;
    200                 else
     224                } else {
    201225                        return ( $a < $b ) ? -1 : 1;
     226                }
    202227        }
    203228
    204229        function no_items() {
    205230                global $plugins;
    206231
    207                 if ( !empty( $plugins['all'] ) )
     232                if ( !empty( $plugins['all'] ) ) {
    208233                        _e( 'No plugins found.' );
    209                 else
     234                } else {
    210235                        _e( 'You do not appear to have any plugins available at this time.' );
     236                }
    211237        }
    212238
    213239        function get_columns() {
     
    214240                global $status;
    215241
    216242                return array(
    217                         'cb'          => !in_array( $status, array( 'mustuse', 'dropins' ) ) ? '<input type="checkbox" />' : '',
     243                        'cb'          => ! in_array( $status, array( 'mustuse', 'dropins' ) ) ? '<input type="checkbox" />' : '',
    218244                        'name'        => __( 'Plugin' ),
    219245                        'description' => __( 'Description' ),
    220246                );
     
    229255
    230256                $status_links = array();
    231257                foreach ( $totals as $type => $count ) {
    232                         if ( !$count )
     258                        if ( ! $count ) {
    233259                                continue;
     260                        }
    234261
    235262                        switch ( $type ) {
    236263                                case 'all':
     
    242269                                case 'recently_activated':
    243270                                        $text = _n( 'Recently Active <span class="count">(%s)</span>', 'Recently Active <span class="count">(%s)</span>', $count );
    244271                                        break;
     272                                case 'recently_updated':
     273                                        $text = _n( 'Recently Updated <span class="count">(%s)</span>', 'Recently Updated <span class="count">(%s)</span>', $count );
     274                                        break;
    245275                                case 'inactive':
    246276                                        $text = _n( 'Inactive <span class="count">(%s)</span>', 'Inactive <span class="count">(%s)</span>', $count );
    247277                                        break;
     
    257287                        }
    258288
    259289                        if ( 'search' != $type ) {
    260                                 $status_links[$type] = sprintf( "<a href='%s' %s>%s</a>",
    261                                         add_query_arg('plugin_status', $type, 'plugins.php'),
     290                                $status_links[ $type ] = sprintf( '<a href="%s"%s>%s</a>',
     291                                        add_query_arg( 'plugin_status', $type, 'plugins.php' ),
    262292                                        ( $type == $status ) ? ' class="current"' : '',
    263293                                        sprintf( $text, number_format_i18n( $count ) )
    264294                                        );
     
    273303
    274304                $actions = array();
    275305
    276                 if ( 'active' != $status )
     306                if ( 'active' != $status ) {
    277307                        $actions['activate-selected'] = $this->screen->in_admin( 'network' ) ? __( 'Network Activate' ) : __( 'Activate' );
     308                }
    278309
    279                 if ( 'inactive' != $status && 'recent' != $status )
     310                if ( 'inactive' != $status && 'recent' != $status ) {
    280311                        $actions['deactivate-selected'] = $this->screen->in_admin( 'network' ) ? __( 'Network Deactivate' ) : __( 'Deactivate' );
     312                }
    281313
    282314                if ( !is_multisite() || $this->screen->in_admin( 'network' ) ) {
    283                         if ( current_user_can( 'update_plugins' ) )
     315                        if ( current_user_can( 'update_plugins' ) ) {
    284316                                $actions['update-selected'] = __( 'Update' );
    285                         if ( current_user_can( 'delete_plugins' ) && ( 'active' != $status ) )
     317                        }
     318                        if ( current_user_can( 'delete_plugins' ) && ( 'active' != $status ) ) {
    286319                                $actions['delete-selected'] = __( 'Delete' );
     320                        }
    287321                }
    288322
    289323                return $actions;
     
    292326        function bulk_actions() {
    293327                global $status;
    294328
    295                 if ( in_array( $status, array( 'mustuse', 'dropins' ) ) )
     329                if ( in_array( $status, array( 'mustuse', 'dropins' ) ) ) {
    296330                        return;
     331                }
    297332
    298333                parent::bulk_actions();
    299334        }
     
    301336        function extra_tablenav( $which ) {
    302337                global $status;
    303338
    304                 if ( ! in_array($status, array('recently_activated', 'mustuse', 'dropins') ) )
     339                if ( ! in_array($status, array('recently_activated', 'recently_updated', 'mustuse', 'dropins') ) ) {
    305340                        return;
     341                }
    306342
    307343                echo '<div class="alignleft actions">';
    308344
    309                 if ( ! $this->screen->in_admin( 'network' ) && 'recently_activated' == $status )
     345                if ( ! $this->screen->in_admin( 'network' ) && 'recently_activated' == $status ) {
    310346                        submit_button( __( 'Clear List' ), 'button', 'clear-recent-list', false );
    311                 elseif ( 'top' == $which && 'mustuse' == $status )
     347                } elseif ( ! $this->screen->in_admin( 'network' ) && 'recently_updated' == $status ) {
     348                        submit_button( __( 'Clear List' ), 'button', 'clear-updated-list', false );
     349                } elseif ( 'top' == $which && 'mustuse' == $status ) {
    312350                        echo '<p>' . sprintf( __( 'Files in the <code>%s</code> directory are executed automatically.' ), str_replace( ABSPATH, '/', WPMU_PLUGIN_DIR ) ) . '</p>';
    313                 elseif ( 'top' == $which && 'dropins' == $status )
     351                } elseif ( 'top' == $which && 'dropins' == $status ) {
    314352                        echo '<p>' . sprintf( __( 'Drop-ins are advanced plugins in the <code>%s</code> directory that replace WordPress functionality when present.' ), str_replace( ABSPATH, '', WP_CONTENT_DIR ) ) . '</p>';
     353                }
    315354
    316355                echo '</div>';
    317356        }
    318357
    319358        function current_action() {
    320                 if ( isset($_POST['clear-recent-list']) )
     359                if ( isset( $_POST['clear-recent-list'] ) ) {
    321360                        return 'clear-recent-list';
     361                }
    322362
     363                if ( isset( $_POST['clear-updated-list'] ) ) {
     364                        return 'clear-updated-list';
     365                }
     366
    323367                return parent::current_action();
    324368        }
    325369
     
    326370        function display_rows() {
    327371                global $status;
    328372
    329                 if ( is_multisite() && ! $this->screen->in_admin( 'network' ) && in_array( $status, array( 'mustuse', 'dropins' ) ) )
     373                if ( is_multisite() && ! $this->screen->in_admin( 'network' ) && in_array( $status, array( 'mustuse', 'dropins' ) ) ) {
    330374                        return;
     375                }
    331376
    332                 foreach ( $this->items as $plugin_file => $plugin_data )
     377                foreach ( $this->items as $plugin_file => $plugin_data ) {
    333378                        $this->single_row( array( $plugin_file, $plugin_data ) );
     379                }
    334380        }
    335381
    336382        function single_row( $item ) {
     
    353399                } elseif ( 'dropins' == $context ) {
    354400                        $dropins = _get_dropins();
    355401                        $plugin_name = $plugin_file;
    356                         if ( $plugin_file != $plugin_data['Name'] )
     402                        if ( $plugin_file != $plugin_data['Name'] ) {
    357403                                $plugin_name .= '<br/>' . $plugin_data['Name'];
     404                        }
    358405                        if ( true === ( $dropins[ $plugin_file ][1] ) ) { // Doesn't require a constant
    359406                                $is_active = true;
    360407                                $description = '<p><strong>' . $dropins[ $plugin_file ][0] . '</strong></p>';
     
    365412                                $is_active = false;
    366413                                $description = '<p><strong>' . $dropins[ $plugin_file ][0] . ' <span class="attention">' . __('Inactive:') . '</span></strong> ' . sprintf( __( 'Requires <code>%s</code> in <code>wp-config.php</code>.' ), "define('" . $dropins[ $plugin_file ][1] . "', true);" ) . '</p>';
    367414                        }
    368                         if ( $plugin_data['Description'] )
     415                        if ( $plugin_data['Description'] ) {
    369416                                $description .= '<p>' . $plugin_data['Description'] . '</p>';
     417                        }
    370418                } else {
    371                         if ( $screen->in_admin( 'network' ) )
     419                        if ( $screen->in_admin( 'network' ) ) {
    372420                                $is_active = is_plugin_active_for_network( $plugin_file );
    373                         else
     421                        } else {
    374422                                $is_active = is_plugin_active( $plugin_file );
     423                        }
    375424
    376425                        if ( $screen->in_admin( 'network' ) ) {
    377426                                if ( $is_active ) {
    378                                         if ( current_user_can( 'manage_network_plugins' ) )
    379                                                 $actions['deactivate'] = '<a href="' . wp_nonce_url('plugins.php?action=deactivate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'deactivate-plugin_' . $plugin_file) . '" title="' . esc_attr__('Deactivate this plugin') . '">' . __('Network Deactivate') . '</a>';
     427                                        if ( current_user_can( 'manage_network_plugins' ) ) {
     428                                                $actions['deactivate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'deactivate-plugin_' . $plugin_file ) . '" title="' . esc_attr__( 'Deactivate this plugin' ) . '">' . __( 'Network Deactivate' ) . '</a>';
     429                                        }
    380430                                } else {
    381                                         if ( current_user_can( 'manage_network_plugins' ) )
    382                                                 $actions['activate'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'activate-plugin_' . $plugin_file) . '" title="' . esc_attr__('Activate this plugin for all sites in this network') . '" class="edit">' . __('Network Activate') . '</a>';
    383                                         if ( current_user_can( 'delete_plugins' ) && ! is_plugin_active( $plugin_file ) )
    384                                                 $actions['delete'] = '<a href="' . wp_nonce_url('plugins.php?action=delete-selected&amp;checked[]=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'bulk-plugins') . '" title="' . esc_attr__('Delete this plugin') . '" class="delete">' . __('Delete') . '</a>';
     431                                        if ( current_user_can( 'manage_network_plugins' ) ) {
     432                                                $actions['activate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'activate-plugin_' . $plugin_file ) . '" title="' . esc_attr__( 'Activate this plugin for all sites in this network' ) . '" class="edit">' . __( 'Network Activate' ) . '</a>';
     433                                        }
     434                                        if ( current_user_can( 'delete_plugins' ) && ! is_plugin_active( $plugin_file ) ) {
     435                                                $actions['delete'] = '<a href="' . wp_nonce_url( 'plugins.php?action=delete-selected&amp;checked[]=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'bulk-plugins' ) . '" title="' . esc_attr__( 'Delete this plugin' ) . '" class="delete">' . __( 'Delete' ) . '</a>';
     436                                        }
    385437                                }
    386438                        } else {
    387439                                if ( $is_active ) {
    388                                         $actions['deactivate'] = '<a href="' . wp_nonce_url('plugins.php?action=deactivate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'deactivate-plugin_' . $plugin_file) . '" title="' . esc_attr__('Deactivate this plugin') . '">' . __('Deactivate') . '</a>';
     440                                        $actions['deactivate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'deactivate-plugin_' . $plugin_file ) . '" title="' . esc_attr__( 'Deactivate this plugin' ) . '">' . __( 'Deactivate' ) . '</a>';
    389441                                } else {
    390                                         $actions['activate'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'activate-plugin_' . $plugin_file) . '" title="' . esc_attr__('Activate this plugin') . '" class="edit">' . __('Activate') . '</a>';
     442                                        $actions['activate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'activate-plugin_' . $plugin_file ) . '" title="' . esc_attr__( 'Activate this plugin' ) . '" class="edit">' . __( 'Activate' ) . '</a>';
    391443
    392                                         if ( ! is_multisite() && current_user_can('delete_plugins') )
    393                                                 $actions['delete'] = '<a href="' . wp_nonce_url('plugins.php?action=delete-selected&amp;checked[]=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'bulk-plugins') . '" title="' . esc_attr__('Delete this plugin') . '" class="delete">' . __('Delete') . '</a>';
     444                                        if ( ! is_multisite() && current_user_can( 'delete_plugins' ) ) {
     445                                                $actions['delete'] = '<a href="' . wp_nonce_url('plugins.php?action=delete-selected&amp;checked[]=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'bulk-plugins' ) . '" title="' . esc_attr__( 'Delete this plugin' ) . '" class="delete">' . __( 'Delete' ) . '</a>';
     446                                        }
    394447                                } // end if $is_active
    395448                         } // end if $screen->in_admin( 'network' )
    396449
    397                         if ( ( ! is_multisite() || $screen->in_admin( 'network' ) ) && current_user_can('edit_plugins') && is_writable(WP_PLUGIN_DIR . '/' . $plugin_file) )
    398                                 $actions['edit'] = '<a href="plugin-editor.php?file=' . $plugin_file . '" title="' . esc_attr__('Open this file in the Plugin Editor') . '" class="edit">' . __('Edit') . '</a>';
     450                        if ( ( ! is_multisite() || $screen->in_admin( 'network' ) ) && current_user_can( 'edit_plugins' ) && is_writable( WP_PLUGIN_DIR . '/' . $plugin_file ) ) {
     451                                $actions['edit'] = '<a href="plugin-editor.php?file=' . $plugin_file . '" title="' . esc_attr__( 'Open this file in the Plugin Editor' ) . '" class="edit">' . __( 'Edit' ) . '</a>';
     452                        }
    399453                } // end if $context
    400454
    401455                $prefix = $screen->in_admin( 'network' ) ? 'network_admin_' : '';
     
    462516                }
    463517
    464518                $id = sanitize_title( $plugin_name );
    465                 if ( ! empty( $totals['upgrade'] ) && ! empty( $plugin_data['update'] ) )
     519                if ( ! empty( $totals['upgrade'] ) && ! empty( $plugin_data['update'] ) ) {
    466520                        $class .= ' update';
     521                }
    467522
    468523                echo "<tr id='$id' class='$class'>";
    469524
     
    471526
    472527                foreach ( $columns as $column_name => $column_display_name ) {
    473528                        $style = '';
    474                         if ( in_array( $column_name, $hidden ) )
     529                        if ( in_array( $column_name, $hidden ) ) {
    475530                                $style = ' style="display:none;"';
     531                        }
    476532
    477533                        switch ( $column_name ) {
    478534                                case 'cb':
     
    489545                                                <div class='$class second plugin-version-author-uri'>";
    490546
    491547                                        $plugin_meta = array();
    492                                         if ( !empty( $plugin_data['Version'] ) )
     548                                        if ( ! empty( $plugin_data['Version'] ) ) {
    493549                                                $plugin_meta[] = sprintf( __( 'Version %s' ), $plugin_data['Version'] );
    494                                         if ( !empty( $plugin_data['Author'] ) ) {
     550                                        }
     551                                        if ( ! empty( $plugin_data['Author'] ) ) {
    495552                                                $author = $plugin_data['Author'];
    496                                                 if ( !empty( $plugin_data['AuthorURI'] ) )
     553                                                if ( ! empty( $plugin_data['AuthorURI'] ) ) {
    497554                                                        $author = '<a href="' . $plugin_data['AuthorURI'] . '" title="' . esc_attr__( 'Visit author homepage' ) . '">' . $plugin_data['Author'] . '</a>';
     555                                                }
    498556                                                $plugin_meta[] = sprintf( __( 'By %s' ), $author );
    499557                                        }
    500                                         if ( ! empty( $plugin_data['PluginURI'] ) )
     558                                        if ( ! empty( $plugin_data['PluginURI'] ) ) {
    501559                                                $plugin_meta[] = '<a href="' . $plugin_data['PluginURI'] . '" title="' . esc_attr__( 'Visit plugin site' ) . '">' . __( 'Visit plugin site' ) . '</a>';
     560                                        }
    502561
    503562                                        /**
    504563                                         * Filter the array of row meta for each plugin in the Plugins list table.
  • includes/class-wp-upgrader.php

     
    416416
    417417                if ( ! $is_multi ) {
    418418
     419                        if ( isset( $hook_extra['action'], $hook_extra['type'] ) && 'update' == $hook_extra['action'] && 'plugin' == $hook_extra['type'] ) {
     420                                if ( isset( $hook_extra['plugin'] ) ) {
     421                                        wp_set_recently_updated( array( $hook_extra['plugin'] ) );
     422                                } elseif( isset( $hook_extra['plugins'] ) ) {
     423                                        wp_set_recently_updated( $hook_extra['plugins'] );
     424                                }
     425                        }
    419426                        /** This action is documented in wp-admin/includes/class-wp-upgrader.php */
    420427                        do_action( 'upgrader_process_complete', $this, $hook_extra );
    421428                        $this->skin->footer();
     
    637644
    638645                $this->maintenance_mode(false);
    639646
     647                wp_set_recently_updated( $plugins );
    640648                /**
    641649                 * Fires when the bulk upgrader process is complete.
    642650                 *
  • plugins.php

     
    326326                        exit;
    327327                        break;
    328328                case 'clear-recent-list':
    329                         if ( ! is_network_admin() )
     329                        if ( ! is_network_admin() ) {
    330330                                update_option( 'recently_activated', array() );
     331                        }
    331332                        break;
     333                case 'clear-updated-list':
     334                        if ( ! is_network_admin() ) {
     335                                update_option( 'recently_updated', array() );
     336                        }
     337                        break;
    332338        }
    333339}
    334340