Make WordPress Core

Ticket #36186: 36186.1.patch

File 36186.1.patch, 1.8 KB (added by johnjamesjacoby, 10 years ago)

Update links to use admin_url() in users.php and upload.php.

  • src/wp-admin/upload.php

    diff --git a/src/wp-admin/upload.php b/src/wp-admin/upload.php
    index 39ef325..9fcc93b 100644
    a b  
    7777                <?php
    7878                echo esc_html( $title );
    7979                if ( current_user_can( 'upload_files' ) ) { ?>
    80                         <a href="media-new.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'file' ); ?></a><?php
     80                        <a href="<?php echo admin_url( 'media-new.php' ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'file' ); ?></a><?php
    8181                }
    8282                ?>
    8383                </h1>
     
    222222<?php
    223223echo esc_html( $title );
    224224if ( current_user_can( 'upload_files' ) ) { ?>
    225         <a href="media-new.php" class="page-title-action"><?php echo esc_html_x('Add New', 'file'); ?></a><?php
     225        <a href="<?php echo admin_url( 'media-new.php' ); ?>" class="page-title-action"><?php echo esc_html_x('Add New', 'file'); ?></a><?php
    226226}
    227227if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
    228228        /* translators: %s: search keywords */
  • src/wp-admin/users.php

    diff --git a/src/wp-admin/users.php b/src/wp-admin/users.php
    index b25bcc7..789f34c 100644
    a b  
    484484<?php
    485485echo esc_html( $title );
    486486if ( current_user_can( 'create_users' ) ) { ?>
    487         <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user' ); ?></a>
     487        <a href="<?php echo admin_url( 'user-new.php' ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user' ); ?></a>
    488488<?php } elseif ( is_multisite() && current_user_can( 'promote_users' ) ) { ?>
    489         <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a>
     489        <a href="<?php echo admin_url( 'user-new.php' ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a>
    490490<?php }
    491491
    492492if ( strlen( $usersearch ) ) {