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: https://develop.svn.wordpress.org/trunk@18248 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2011-06-10 22:16:30 +00:00
parent e3a1054bef
commit 9f4d6e2d27

View File

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