Make WordPress Core


Ignore:
Timestamp:
07/07/2015 12:01:31 AM (9 years ago)
Author:
jeremyfelt
Message:

Assign proper active class when showing plugin updates in network admin

Previously, a plugin would trigger an active class if it was active on the network's main site.

Fixes #32901.

File:
1 edited

Legend:

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

    r32784 r33100  
    316316
    317317    if ( is_network_admin() || !is_multisite() ) {
    318         $active_class = is_plugin_active( $file ) ? ' active' : '';
     318        if ( is_network_admin() ) {
     319            $active_class = is_plugin_active_for_network( $file ) ? ' active': '';
     320        } else {
     321            $active_class = is_plugin_active( $file ) ? ' active' : '';
     322        }
     323
    319324        echo '<tr class="plugin-update-tr' . $active_class . '" id="' . esc_attr( $r->slug . '-update' ) . '" data-slug="' . esc_attr( $r->slug ) . '" data-plugin="' . esc_attr( $file ) . '"><td colspan="' . esc_attr( $wp_list_table->get_column_count() ) . '" class="plugin-update colspanchange"><div class="update-message">';
    320325
Note: See TracChangeset for help on using the changeset viewer.