WordPress.org

Make WordPress Core

Ticket #12139: 12139.4.diff

File 12139.4.diff, 1.0 KB (added by nacin, 5 years ago)

Missing is_multisite() check prevented a Network plugin on a single blog install from having an Activate link.

  • wp-admin/plugins.php

     
    491491                                $actions[] = '<a href="' . wp_nonce_url('plugins.php?action=deactivate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page, 'deactivate-plugin_' . $plugin_file) . '" title="' . __('Deactivate this plugin') . '">' . __('Deactivate') . '</a>'; 
    492492                        } 
    493493                } else { 
    494                         if ( is_network_only_plugin( $plugin_file ) ) 
     494                        if ( is_multisite() && is_network_only_plugin( $plugin_file ) ) 
    495495                                $actions[] = '<span title="' . __('This plugin can only be activated for all sites in a network') . '">' . __('Network Only') . '</span>'; 
    496496                        else 
    497497                                $actions[] = '<a href="' . wp_nonce_url('plugins.php?action=activate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page, 'activate-plugin_' . $plugin_file) . '" title="' . __('Activate this plugin') . '" class="edit">' . __('Activate') . '</a>';