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
This commit is contained in:
parent
3f1b37148d
commit
975fb7af21
@ -62,7 +62,7 @@ class WP_Themes_List_Table extends WP_List_Table {
|
|||||||
|
|
||||||
function no_items() {
|
function no_items() {
|
||||||
if ( current_user_can( 'install_themes' ) )
|
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
|
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' ) );
|
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 = array();
|
||||||
$actions[] = '<a href="' . $activate_link . '" class="activatelink" title="' . $activate_text . '">' . __( 'Activate' ) . '</a>';
|
$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 “%s”' ), $theme_name ) ) . '">' . __( 'Preview' ) . '</a>';
|
$actions[] = '<a href="' . $preview_link . '" class="thickbox thickbox-preview" title="' . esc_attr( sprintf( __( 'Preview “%s”' ), $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&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[] = '<a class="submitdelete deletion" href="' . wp_nonce_url( "themes.php?action=delete&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] );
|
$actions = apply_filters( 'theme_action_links', $actions, $themes[$theme_name] );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user