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

Props johnjamesjacoby.
See #36186.

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

View File

@ -77,7 +77,7 @@ if ( 'grid' === $mode ) {
<?php
echo esc_html( $title );
if ( current_user_can( 'upload_files' ) ) { ?>
<a href="media-new.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'file' ); ?></a><?php
<a href="<?php echo admin_url( 'media-new.php' ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'file' ); ?></a><?php
}
?>
</h1>
@ -222,7 +222,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
<?php
echo esc_html( $title );
if ( current_user_can( 'upload_files' ) ) { ?>
<a href="media-new.php" class="page-title-action"><?php echo esc_html_x('Add New', 'file'); ?></a><?php
<a href="<?php echo admin_url( 'media-new.php' ); ?>" class="page-title-action"><?php echo esc_html_x('Add New', 'file'); ?></a><?php
}
if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
/* translators: %s: search keywords */