Use `admin_url()` for "Add New" links in `wp-admin/users.php`.

Props johnjamesjacoby.
Fixes #36186.

git-svn-id: https://develop.svn.wordpress.org/trunk@36902 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2016-03-09 19:08:58 +00:00
parent 96520194c7
commit 11c47a6cb5
1 changed files with 2 additions and 2 deletions

View File

@ -484,9 +484,9 @@ if ( ! empty($messages) ) {
<?php
echo esc_html( $title );
if ( current_user_can( 'create_users' ) ) { ?>
<a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user' ); ?></a>
<a href="<?php echo admin_url( 'user-new.php' ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user' ); ?></a>
<?php } elseif ( is_multisite() && current_user_can( 'promote_users' ) ) { ?>
<a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a>
<a href="<?php echo admin_url( 'user-new.php' ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a>
<?php }
if ( strlen( $usersearch ) ) {