diff --git a/wp-admin/includes/class-wp-themes-list-table.php b/wp-admin/includes/class-wp-themes-list-table.php
index 9bbfa97ed3..389c8b9403 100644
--- a/wp-admin/includes/class-wp-themes-list-table.php
+++ b/wp-admin/includes/class-wp-themes-list-table.php
@@ -61,14 +61,26 @@ class WP_Themes_List_Table extends WP_List_Table {
}
function no_items() {
- if ( current_user_can( 'install_themes' ) ) {
- if ( is_multisite() )
- printf( 'You only have one theme installed right now. Visit the Network Admin to install more themes.', network_admin_url( 'theme-install.php' ) );
- else
- 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.' ), admin_url( 'theme-install.php' ) );
+ if ( is_multisite() ) {
+ if ( current_user_can( 'install_themes' ) && current_user_can( 'manage_network_themes' ) ) {
+ printf( __( 'You only have one theme enabled for this site right now. Visit the Network Admin to enable or install more themes.' ), network_admin_url( 'site-themes.php?id=' . $GLOBALS['blog_id'] ), network_admin_url( 'theme-install.php' ) );
+
+ return;
+ } elseif ( current_user_can( 'manage_network_themes' ) ) {
+ printf( __( 'You only have one theme enabled for this site right now. Visit the Network Admin to enable more themes.' ), network_admin_url( 'site-themes.php?id=' . $GLOBALS['blog_id'] ) );
+
+ return;
+ }
+ // else, fallthrough. install_themes doesn't help if you can't enable it.
} 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' ) );
+ 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.' ), admin_url( 'theme-install.php' ) );
+
+ return;
+ }
}
+ // Fallthrough.
+ printf( __( 'Only the current theme is available to you. Contact the %s administrator for information about accessing additional themes.' ), get_site_option( 'site_name' ) );
}
function display_table() {