WordPress.org

Make WordPress Core

Ticket #15525: 15525.4.patch

File 15525.4.patch, 1.1 KB (added by PeteMall, 7 years ago)

Hide tabs on site admin themes page for multisite/

  • wp-admin/themes.php

     
    7171<div id="message3" class="updated"><p><?php _e('Theme deleted.') ?></p></div>
    7272<?php endif; ?>
    7373
    74 <div class="wrap">
    75 <?php screen_icon(); ?>
     74<div class="wrap"><?php
     75screen_icon();
     76if ( !is_multisite() ) : ?>
    7677<h2 class="nav-tab-wrapper">
    7778<a href="themes.php" class="nav-tab nav-tab-active"><?php echo esc_html( $title ); ?></a>
    78 <?php
    79 if ( current_user_can('install_themes') ) {
    80         $href = is_multisite() ? network_admin_url( 'theme-install.php' ) : admin_url( 'theme-install.php' );
    81 ?>
    82 <a href="<?php echo $href; ?>" class="nav-tab"><?php echo esc_html_x('Install Themes', 'theme'); ?></a>
    83 <?php } ?>
     79        <?php if ( current_user_can('install_themes') ) : ?>
     80<a href="<?php echo admin_url( 'theme-install.php'); ?>" class="nav-tab"><?php echo esc_html_x('Install Themes', 'theme'); ?></a>
     81        <?php endif;
     82else : ?>
     83<h2>
     84<?php esc_html_e( $title ); ?>
     85<?php endif; ?>
    8486</h2>
    8587
    8688<h3><?php _e('Current Theme'); ?></h3>