diff --git a/wp-admin/plugins.php b/wp-admin/plugins.php index 9f70eb7403..774b86c07a 100644 --- a/wp-admin/plugins.php +++ b/wp-admin/plugins.php @@ -340,8 +340,9 @@ function print_plugins_table($plugins, $context = '') { } foreach ( (array)$plugins as $plugin_file => $plugin_data) { $actions = array(); + $is_active = is_plugin_active($plugin_file); - if ( 'active' == $context ) + if ( $is_active ) $actions[] = '' . __('Deactivate') . ''; else //Inactive or Recently deactivated $actions[] = '' . __('Activate') . ''; @@ -352,7 +353,7 @@ function print_plugins_table($plugins, $context = '') { $actions = apply_filters( 'plugin_action_links', $actions, $plugin_file, $plugin_data, $context ); $actions = apply_filters( "plugin_action_links_$plugin_file", $actions, $plugin_file, $plugin_data, $context ); $action_count = count($actions); - $class = is_plugin_active($plugin_file) ? 'active' : 'inactive'; + $class = $is_active ? 'active' : 'inactive'; echo "