WordPress.org

Make WordPress Core

Changeset 18248


Ignore:
Timestamp:
06/10/11 22:16:30 (7 years ago)
Author:
nacin
Message:

Fix whitespace discrepancy between Manage Themes and Install Themes tabs. props trepmal. Don't show a single Manage Themes heading as a tab if the user doesn't have install_themes. fixes #17758.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/themes.php

    r18247 r18248  
    7272<div class="wrap"><?php 
    7373screen_icon(); 
    74 if ( !is_multisite() ) : ?> 
     74if ( ! is_multisite() && current_user_can( 'install_themes' ) ) : ?> 
    7575<h2 class="nav-tab-wrapper"> 
    76 <a href="themes.php" class="nav-tab nav-tab-active"><?php echo esc_html( $title ); ?></a> 
    77     <?php if ( current_user_can('install_themes') ) : ?> 
    78 <a href="<?php echo admin_url( 'theme-install.php'); ?>" class="nav-tab"><?php echo esc_html_x('Install Themes', 'theme'); ?></a> 
    79     <?php endif; 
    80 else : ?> 
    81 <h2> 
    82 <?php echo esc_html( $title ); ?> 
     76<a href="themes.php" class="nav-tab nav-tab-active"><?php echo esc_html( $title ); ?></a><a href="<?php echo admin_url( 'theme-install.php'); ?>" class="nav-tab"><?php echo esc_html_x('Install Themes', 'theme'); ?></a> 
     77<?php else : ?> 
     78<h2><?php echo esc_html( $title ); ?> 
    8379<?php endif; ?> 
    8480</h2> 
Note: See TracChangeset for help on using the changeset viewer.