Make WordPress Core

Changeset 17069


Ignore:
Timestamp:
12/19/2010 10:27:30 PM (14 years ago)
Author:
westi
Message:

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

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/user-new.php

    r17049 r17069  
    183183<div class="wrap">
    184184<?php screen_icon(); ?>
    185 <h2 id="add-new-user"><?php _e('Add New User') ?></h2>
     185<h2 id="add-new-user"> <?php
     186if ( current_user_can( 'create_users' ) ) {
     187    echo _x( 'Add New User', 'user' );
     188} elseif ( current_user_can( 'promote_users' ) ) {
     189    echo _x( 'Add Existing User', 'user' );
     190} ?>
     191</h2>
    186192
    187193<?php if ( isset($errors) && is_wp_error( $errors ) ) : ?>
  • trunk/wp-admin/users.php

    r17010 r17069  
    344344<div class="wrap">
    345345<?php screen_icon(); ?>
    346 <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 }
     346<h2>
     347<?php
     348echo esc_html( $title );
     349if ( current_user_can( 'create_users' ) ) { ?>
     350    <a href="user-new.php" class="button add-new-h2"><?php echo esc_html_x( 'Add New', 'user' ); ?></a>
     351<?php } elseif ( current_user_can( 'promote_users' ) ) { ?>
     352    <a href="user-new.php" class="button add-new-h2"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a>
     353<?php }
     354
    347355if ( $usersearch )
    348356    printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( $usersearch ) ); ?>
Note: See TracChangeset for help on using the changeset viewer.