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: http://svn.automattic.com/wordpress/trunk@16756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-12-06 20:48:41 +00:00
parent 05f5c807ab
commit bee34b37bc
1 changed files with 2 additions and 2 deletions

View File

@ -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 <em><a href="%s">Install Themes</a></em> 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 <em><a href="%s">Install Themes</a></em> 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[] = '<a href="' . $activate_link . '" class="activatelink" title="' . $activate_text . '">' . __( 'Activate' ) . '</a>';
$actions[] = '<a href="' . $preview_link . '" class="thickbox thickbox-preview" title="' . esc_attr( sprintf( __( 'Preview &#8220;%s&#8221;' ), $theme_name ) ) . '">' . __( 'Preview' ) . '</a>';
if ( current_user_can( 'delete_themes' ) )
if ( ! is_multisite() && current_user_can( 'delete_themes' ) )
$actions[] = '<a class="submitdelete deletion" href="' . wp_nonce_url( "themes.php?action=delete&amp;template=$stylesheet", 'delete-theme_' . $stylesheet ) . '" onclick="' . "return confirm( '" . esc_js( sprintf( __( "You are about to delete this theme '%s'\n 'Cancel' to stop, 'OK' to delete." ), $theme_name ) ) . "' );" . '">' . __( 'Delete' ) . '</a>';
$actions = apply_filters( 'theme_action_links', $actions, $themes[$theme_name] );