Make WordPress Core


Ignore:
Timestamp:
05/19/2011 07:52:11 PM (14 years ago)
Author:
nacin
Message:

Add 'Add New' buttons to edit links, edit media, and edit user screens. props sbressler, fixes #17499.

File:
1 edited

Legend:

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

    r17748 r17975  
    169169<div class="wrap" id="profile-page">
    170170<?php screen_icon(); ?>
    171 <h2><?php echo esc_html( $title ); ?></h2>
     171<h2>
     172<?php
     173echo esc_html( $title );
     174if ( ! IS_PROFILE_PAGE ) {
     175    if ( current_user_can( 'create_users' ) ) { ?>
     176        <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'user' ); ?></a>
     177    <?php } elseif ( is_multisite() && current_user_can( 'promote_users' ) ) { ?>
     178        <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a>
     179    <?php }
     180} ?>
     181</h2>
    172182
    173183<form id="your-profile" action="<?php echo esc_url( self_admin_url( IS_PROFILE_PAGE ? 'profile.php' : 'user-edit.php' ) ); ?>" method="post"<?php do_action('user_edit_form_tag'); ?>>
Note: See TracChangeset for help on using the changeset viewer.