Make WordPress Core


Ignore:
Timestamp:
12/06/2010 08:48:41 PM (14 years ago)
Author:
nacin
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-themes-list-table.php

    r16465 r16756  
    6363    function no_items() {
    6464        if ( current_user_can( 'install_themes' ) )
    65             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' );
     65            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' ) );
    6666        else
    6767            printf( __( 'Only the current theme is available to you. Contact the %s administrator for information about accessing additional themes.' ), get_site_option( 'site_name' ) );
     
    140140    $actions[] = '<a href="' . $activate_link .  '" class="activatelink" title="' . $activate_text . '">' . __( 'Activate' ) . '</a>';
    141141    $actions[] = '<a href="' . $preview_link . '" class="thickbox thickbox-preview" title="' . esc_attr( sprintf( __( 'Preview &#8220;%s&#8221;' ), $theme_name ) ) . '">' . __( 'Preview' ) . '</a>';
    142     if ( current_user_can( 'delete_themes' ) )
     142    if ( ! is_multisite() && current_user_can( 'delete_themes' ) )
    143143        $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>';
    144144    $actions = apply_filters( 'theme_action_links', $actions, $themes[$theme_name] );
Note: See TracChangeset for help on using the changeset viewer.