From 975fb7af21c8c5a35add81f000c474b86f9f2d3f Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 6 Dec 2010 20:48:41 +0000 Subject: [PATCH] Don't show theme deletion link in multisite in the site admin. Also, link to proper theme-install when using multisite if there are no themes. see #15707. git-svn-id: https://develop.svn.wordpress.org/trunk@16756 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/class-wp-themes-list-table.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/class-wp-themes-list-table.php b/wp-admin/includes/class-wp-themes-list-table.php index bfd7c6b46b..89f3e44a30 100644 --- a/wp-admin/includes/class-wp-themes-list-table.php +++ b/wp-admin/includes/class-wp-themes-list-table.php @@ -62,7 +62,7 @@ class WP_Themes_List_Table extends WP_List_Table { function no_items() { if ( current_user_can( 'install_themes' ) ) - printf( __( 'You only have one theme installed right now. Live a little! You can choose from over 1,000 free themes in the WordPress.org Theme Directory at any time: just click on the Install Themes tab above.' ), 'theme-install.php' ); + printf( __( 'You only have one theme installed right now. Live a little! You can choose from over 1,000 free themes in the WordPress.org Theme Directory at any time: just click on the Install Themes tab above.' ), is_multisite() ? network_admin_url( 'theme-install.php' ) : admin_url( 'theme-install.php' ) ); else printf( __( 'Only the current theme is available to you. Contact the %s administrator for information about accessing additional themes.' ), get_site_option( 'site_name' ) ); } @@ -139,7 +139,7 @@ foreach ( $cols as $col => $theme_name ) { $actions = array(); $actions[] = '' . __( 'Activate' ) . ''; $actions[] = '' . __( 'Preview' ) . ''; - if ( current_user_can( 'delete_themes' ) ) + if ( ! is_multisite() && current_user_can( 'delete_themes' ) ) $actions[] = '' . __( 'Delete' ) . ''; $actions = apply_filters( 'theme_action_links', $actions, $themes[$theme_name] );