Improve the button and header test to give a clearer picture between Adding New Users and Adding Exiting Users to a site. Fixes #14756

git-svn-id: https://develop.svn.wordpress.org/trunk@17069 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2010-12-19 22:27:30 +00:00
parent 9a5687bdfd
commit eeb06f8967
2 changed files with 16 additions and 2 deletions

View File

@ -182,7 +182,13 @@ if ( isset($_GET['update']) ) {
?>
<div class="wrap">
<?php screen_icon(); ?>
<h2 id="add-new-user"><?php _e('Add New User') ?></h2>
<h2 id="add-new-user"> <?php
if ( current_user_can( 'create_users' ) ) {
echo _x( 'Add New User', 'user' );
} elseif ( current_user_can( 'promote_users' ) ) {
echo _x( 'Add Existing User', 'user' );
} ?>
</h2>
<?php if ( isset($errors) && is_wp_error( $errors ) ) : ?>
<div class="error">

View File

@ -343,7 +343,15 @@ if ( ! empty($messages) ) {
<div class="wrap">
<?php screen_icon(); ?>
<h2><?php echo esc_html( $title ); if ( current_user_can( 'create_users' ) || current_user_can( 'promote_users' ) ) { ?> <a href="user-new.php" class="button add-new-h2"><?php echo esc_html_x('Add New', 'user'); ?></a><?php }
<h2>
<?php
echo esc_html( $title );
if ( current_user_can( 'create_users' ) ) { ?>
<a href="user-new.php" class="button add-new-h2"><?php echo esc_html_x( 'Add New', 'user' ); ?></a>
<?php } elseif ( current_user_can( 'promote_users' ) ) { ?>
<a href="user-new.php" class="button add-new-h2"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a>
<?php }
if ( $usersearch )
printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( $usersearch ) ); ?>
</h2>