WordPress.org

Make WordPress Core

Ticket #15372: wp_admin_plugins.patch

File wp_admin_plugins.patch, 1.1 KB (added by raido357, 3 years ago)

wp-admin/plugins.php patch

Line 
1*** /Users/raido/Downloads/wordpress-1/wp-admin/plugins.php     2010-06-24 16:10:46.000000000 +0300
2--- wp-admin/plugins.php        2010-11-10 12:14:31.000000000 +0200
3***************
4*** 579,584 ****
5--- 579,587 ----
6                                        $actions['activate'] = '<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>';
7 
8                                if ( is_multisite() && current_user_can( 'manage_network_plugins' ) )
9+                                       if(is_blog_only_plugin($plugin_file))
10+                                               unset($actions['network_activate']);
11+                                       else
12                                        $actions['network_activate'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&amp;networkwide=1&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page, 'activate-plugin_' . $plugin_file) . '" title="' . __('Activate this plugin for all sites in this network') . '" class="edit">' . __('Network Activate') . '</a>';
13 
14                                if ( current_user_can('delete_plugins') )