mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Remove unnecessary bulk actions for plugins re: network admin. props PeteMall, see #14435.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16036 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fed42ecdf1
commit
80873094fe
@ -263,6 +263,12 @@ class WP_Plugins_Table extends WP_List_Table {
|
||||
$actions['update-selected'] = __( 'Update' );
|
||||
if ( current_user_can( 'delete_plugins' ) && ( 'active' != $status ) )
|
||||
$actions['delete-selected'] = __( 'Delete' );
|
||||
|
||||
if ( is_multisite() && !is_network_admin() ) {
|
||||
unset( $actions['network-activate-selected'] );
|
||||
unset( $actions['update-selected'] );
|
||||
unset( $actions['delete-selected'] );
|
||||
}
|
||||
|
||||
return $actions;
|
||||
}
|
||||
@ -360,7 +366,7 @@ class WP_Plugins_Table extends WP_List_Table {
|
||||
|
||||
$actions['activate'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'activate-plugin_' . $plugin_file) . '" title="' . __('Activate this plugin') . '" class="edit">' . __('Activate') . '</a>';
|
||||
|
||||
if ( current_user_can('delete_plugins') )
|
||||
if ( ! is_multisite() && current_user_can('delete_plugins') )
|
||||
$actions['delete'] = '<a href="' . wp_nonce_url('plugins.php?action=delete-selected&checked[]=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-plugins') . '" title="' . __('Delete this plugin') . '" class="delete">' . __('Delete') . '</a>';
|
||||
} // end if $is_active
|
||||
} // end if is_network_admin()
|
||||
|
Loading…
Reference in New Issue
Block a user