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

git-svn-id: http://svn.automattic.com/wordpress/trunk@17975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-05-19 19:52:11 +00:00
parent 5e5f344a48
commit 1fdf0b9430
3 changed files with 19 additions and 3 deletions

View File

@ -53,7 +53,7 @@ require_once ('admin-header.php');
?> ?>
<div class="wrap"> <div class="wrap">
<?php screen_icon(); ?> <?php screen_icon(); ?>
<h2><?php echo esc_html( $title ); ?></h2> <h2><?php echo esc_html( $title ); ?> <a href="link-add.php" class="add-new-h2"><?php echo esc_html_x('Add New', 'link'); ?></a></h2>
<?php if ( isset( $_GET['added'] ) ) : ?> <?php if ( isset( $_GET['added'] ) ) : ?>
<div id="message" class="updated"><p><?php _e('Link added.'); ?></p></div> <div id="message" class="updated"><p><?php _e('Link added.'); ?></p></div>

View File

@ -97,7 +97,13 @@ case 'edit' :
<div class="wrap"> <div class="wrap">
<?php screen_icon(); ?> <?php screen_icon(); ?>
<h2><?php _e( 'Edit Media' ); ?></h2> <h2>
<?php
echo esc_html( $title );
if ( current_user_can( 'upload_files' ) ) { ?>
<a href="media-new.php" class="add-new-h2"><?php echo esc_html_x('Add New', 'file'); ?></a>
<?php } ?>
</h2>
<form method="post" action="" class="media-upload-form" id="media-single-form"> <form method="post" action="" class="media-upload-form" id="media-single-form">
<p class="submit" style="padding-bottom: 0;"> <p class="submit" style="padding-bottom: 0;">

View File

@ -168,7 +168,17 @@ include (ABSPATH . 'wp-admin/admin-header.php');
<div class="wrap" id="profile-page"> <div class="wrap" id="profile-page">
<?php screen_icon(); ?> <?php screen_icon(); ?>
<h2><?php echo esc_html( $title ); ?></h2> <h2>
<?php
echo esc_html( $title );
if ( ! IS_PROFILE_PAGE ) {
if ( current_user_can( 'create_users' ) ) { ?>
<a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'user' ); ?></a>
<?php } elseif ( is_multisite() && current_user_can( 'promote_users' ) ) { ?>
<a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a>
<?php }
} ?>
</h2>
<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'); ?>> <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'); ?>>
<?php wp_nonce_field('update-user_' . $user_id) ?> <?php wp_nonce_field('update-user_' . $user_id) ?>