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

Props johnjamesjacoby.
See #36186.
Built from https://develop.svn.wordpress.org/trunk@36901


git-svn-id: http://core.svn.wordpress.org/trunk@36869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2016-03-09 19:09:25 +00:00
parent 745ae9915f
commit 729ddb899c
2 changed files with 3 additions and 3 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 */

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.5-beta2-36900';
$wp_version = '4.5-beta2-36901';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.