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.

git-svn-id: http://svn.automattic.com/wordpress/trunk@18248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-06-10 22:16:30 +00:00
parent 12dd9113cb
commit 343d07bb5a
1 changed files with 4 additions and 8 deletions

View File

@ -71,15 +71,11 @@ require_once('./admin-header.php');
<div class="wrap"><?php
screen_icon();
if ( !is_multisite() ) : ?>
if ( ! is_multisite() && current_user_can( 'install_themes' ) ) : ?>
<h2 class="nav-tab-wrapper">
<a href="themes.php" class="nav-tab nav-tab-active"><?php echo esc_html( $title ); ?></a>
<?php if ( current_user_can('install_themes') ) : ?>
<a href="<?php echo admin_url( 'theme-install.php'); ?>" class="nav-tab"><?php echo esc_html_x('Install Themes', 'theme'); ?></a>
<?php endif;
else : ?>
<h2>
<?php echo esc_html( $title ); ?>
<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>
<?php else : ?>
<h2><?php echo esc_html( $title ); ?>
<?php endif; ?>
</h2>