Changes from branches/3.1/wp-admin/user-edit.php at r17382 to trunk/wp-admin/user-edit.php at r17975
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/user-edit.php
r17382 r17975 45 45 '<p>' . __('Remember to click the Update Profile button when you are finished.') . '</p>' . 46 46 '<p><strong>' . __('For more information:') . '</strong></p>' . 47 '<p>' . __('<a href="http://codex.wordpress.org/Users_Your_Profile_S ubPanel" target="_blank">Documentation on User Profiles</a>') . '</p>' .47 '<p>' . __('<a href="http://codex.wordpress.org/Users_Your_Profile_Screen" target="_blank">Documentation on User Profiles</a>') . '</p>' . 48 48 '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' 49 49 ); … … 52 52 $wp_http_referer = remove_query_arg(array('update', 'delete_count'), stripslashes($wp_http_referer)); 53 53 54 $all_post_caps = array('posts', 'pages'); 55 $user_can_edit = false; 56 foreach ( $all_post_caps as $post_cap ) 57 $user_can_edit |= current_user_can("edit_$post_cap"); 54 $user_can_edit = current_user_can( 'edit_posts' ) || current_user_can( 'edit_pages' ); 58 55 59 56 /** … … 162 159 <p><strong><?php _e('User updated.') ?></strong></p> 163 160 <?php if ( $wp_http_referer && !IS_PROFILE_PAGE ) : ?> 164 <p><a href="<?php echo esc_url( $wp_http_referer ); ?>"><?php _e('← Back to Authors andUsers'); ?></a></p>161 <p><a href="<?php echo esc_url( $wp_http_referer ); ?>"><?php _e('← Back to Users'); ?></a></p> 165 162 <?php endif; ?> 166 163 </div> … … 172 169 <div class="wrap" id="profile-page"> 173 170 <?php screen_icon(); ?> 174 <h2><?php echo esc_html( $title ); ?></h2> 171 <h2> 172 <?php 173 echo esc_html( $title ); 174 if ( ! IS_PROFILE_PAGE ) { 175 if ( current_user_can( 'create_users' ) ) { ?> 176 <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'user' ); ?></a> 177 <?php } elseif ( is_multisite() && current_user_can( 'promote_users' ) ) { ?> 178 <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a> 179 <?php } 180 } ?> 181 </h2> 175 182 176 183 <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'); ?>> … … 214 221 <label for="admin_bar_admin"> 215 222 <input name="admin_bar_admin" type="checkbox" id="admin_bar_admin" value="1" <?php checked( _get_admin_bar_pref( 'admin', $profileuser->ID ) ); ?> /> 216 <?php /* translators: Show admin bar in dashboard */ _e( 'in dashboard' ); ?></label> 223 <?php /* translators: Show admin bar in dashboard */ _e( 'in dashboard' ); ?></label></fieldset> 217 224 </td> 218 225 </tr> … … 285 292 <?php 286 293 $public_display = array(); 294 $public_display['display_nickname'] = $profileuser->nickname; 287 295 $public_display['display_username'] = $profileuser->user_login; 288 $public_display['display_nickname'] = $profileuser->nickname; 296 289 297 if ( !empty($profileuser->first_name) ) 290 298 $public_display['display_firstname'] = $profileuser->first_name; 299 291 300 if ( !empty($profileuser->last_name) ) 292 301 $public_display['display_lastname'] = $profileuser->last_name; 302 293 303 if ( !empty($profileuser->first_name) && !empty($profileuser->last_name) ) { 294 304 $public_display['display_firstlast'] = $profileuser->first_name . ' ' . $profileuser->last_name; 295 305 $public_display['display_lastfirst'] = $profileuser->last_name . ' ' . $profileuser->first_name; 296 306 } 307 297 308 if ( !in_array( $profileuser->display_name, $public_display ) ) // Only add this if it isn't duplicated elsewhere 298 309 $public_display = array( 'display_displayname' => $profileuser->display_name ) + $public_display; 310 299 311 $public_display = array_map( 'trim', $public_display ); 300 312 $public_display = array_unique( $public_display ); 313 301 314 foreach ( $public_display as $id => $item ) { 302 315 ?> 303 <option id="<?php echo $id; ?>" value="<?php echo esc_attr($item); ?>"<?php selected( $profileuser->display_name, $item ); ?>><?php echo $item; ?></option>316 <option id="<?php echo $id; ?>"<?php selected( $profileuser->display_name, $item ); ?>><?php echo $item; ?></option> 304 317 <?php 305 318 }
Note: See TracChangeset
for help on using the changeset viewer.