Changeset 21364
- Timestamp:
- 07/30/2012 06:30:03 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-ms-users-list-table.php
r21323 r21364 174 174 case 'username': 175 175 $avatar = get_avatar( $user->user_email, 32 ); 176 if ( get_current_user_id() == $user->ID ) { 177 $edit_link = esc_url( network_admin_url( 'profile.php' ) ); 178 } else { 179 $edit_link = esc_url( network_admin_url( add_query_arg( 'wp_http_referer', urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ), 'user-edit.php?user_id=' . $user->ID ) ) ); 180 } 176 $edit_link = esc_url( add_query_arg( 'wp_http_referer', urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ), get_edit_user_link( $user->ID ) ) ); 181 177 182 178 echo "<td $attributes>"; ?> -
trunk/wp-admin/includes/class-wp-users-list-table.php
r21323 r21364 232 232 if ( current_user_can( 'list_users' ) ) { 233 233 // Set up the user editing link 234 // TODO: make profile/user-edit determination a separate function 235 if ( get_current_user_id() == $user_object->ID ) { 236 $edit_link = 'profile.php'; 237 } else { 238 $edit_link = esc_url( add_query_arg( 'wp_http_referer', urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ), "user-edit.php?user_id=$user_object->ID" ) ); 239 } 234 $edit_link = esc_url( add_query_arg( 'wp_http_referer', urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ), get_edit_user_link( $user_object->ID ) ) ); 240 235 241 236 // Set up the hover actions for this user -
trunk/wp-admin/includes/dashboard.php
r21311 r21364 1264 1264 <li><?php echo sprintf( __( '<a href="%s">Select your tagline and time zone</a>' ), esc_url( admin_url('options-general.php') ) ); ?></li> 1265 1265 <li><?php echo sprintf( __( '<a href="%s">Turn comments on or off</a>' ), esc_url( admin_url('options-discussion.php') ) ); ?></li> 1266 <li><?php echo sprintf( __( '<a href="%s">Fill in your profile</a>' ), esc_url( admin_url('profile.php') ) ); ?></li>1266 <li><?php echo sprintf( __( '<a href="%s">Fill in your profile</a>' ), esc_url( get_edit_profile_url( get_current_user_id() ) ) ); ?></li> 1267 1267 </ul> 1268 1268 </div> -
trunk/wp-admin/includes/user.php
r21170 r21364 354 354 _e('You’re using the auto-generated password for your account. Would you like to change it to something easier to remember?'); 355 355 echo '</p><p>'; 356 printf( '<a href="%s">' . __('Yes, take me to my profile page') . '</a> | ', admin_url('profile.php') . '#password' );356 printf( '<a href="%s">' . __('Yes, take me to my profile page') . '</a> | ', get_edit_profile_url( get_current_user_id() ) . '#password' ); 357 357 printf( '<a href="%s" id="default-password-nag-no">' . __('No thanks, do not remind me again') . '</a>', '?default_password_nag=0' ); 358 358 echo '</p></div>'; -
trunk/wp-admin/user-edit.php
r21204 r21364 140 140 141 141 if ( !is_wp_error( $errors ) ) { 142 $redirect = (IS_PROFILE_PAGE ? "profile.php?" : "user-edit.php?user_id=$user_id&"). "updated=true";142 $redirect = add_query_arg( 'updated', true, get_edit_user_link( $user_id ) ); 143 143 if ( $wp_http_referer ) 144 144 $redirect = add_query_arg('wp_http_referer', urlencode($wp_http_referer), $redirect); -
trunk/wp-includes/comment-template.php
r21330 r21364 1538 1538 'comment_field' => '<p class="comment-form-comment"><label for="comment">' . _x( 'Comment', 'noun' ) . '</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>', 1539 1539 'must_log_in' => '<p class="must-log-in">' . sprintf( __( 'You must be <a href="%s">logged in</a> to post a comment.' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>', 1540 'logged_in_as' => '<p class="logged-in-as">' . sprintf( __( 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>' ), admin_url( 'profile.php'), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',1540 'logged_in_as' => '<p class="logged-in-as">' . sprintf( __( 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>' ), get_edit_user_link(), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>', 1541 1541 'comment_notes_before' => '<p class="comment-notes">' . __( 'Your email address will not be published.' ) . ( $req ? $required_text : '' ) . '</p>', 1542 1542 'comment_notes_after' => '<p class="form-allowed-tags">' . sprintf( __( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s' ), ' <code>' . allowed_tags() . '</code>' ) . '</p>', -
trunk/wp-includes/link-template.php
r21174 r21364 1057 1057 } 1058 1058 1059 /** 1060 * Retrieve edit user link 1061 * 1062 * @since 3.5.0 1063 * 1064 * @param int $user_id Optional. User ID. Defaults to the current user. 1065 * @return string URL to edit user page or empty string. 1066 */ 1067 function get_edit_user_link( $user_id = null ) { 1068 if ( ! $user_id ) 1069 $user_id = get_current_user_id(); 1070 1071 if ( empty( $user_id ) || ! current_user_can( 'edit_user', $user_id ) ) 1072 return ''; 1073 1074 $user = new WP_User( $user_id ); 1075 1076 if ( ! $user->exists() ) 1077 return ''; 1078 1079 if ( get_current_user_id() == $user->ID ) 1080 $link = get_edit_profile_url( $user->ID ); 1081 else 1082 $link = add_query_arg( 'user_id', $user->ID, self_admin_url( 'user-edit.php' ) ); 1083 1084 return apply_filters( 'get_edit_user_link', $link, $user->ID ); 1085 } 1086 1059 1087 // Navigation links 1060 1088 -
trunk/wp-includes/theme-compat/comments-popup.php
r19028 r21364 69 69 <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform"> 70 70 <?php if ( $user_ID ) : ?> 71 <p><?php printf(__('Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out »</a>'), get_ option('siteurl') . '/wp-admin/profile.php', $user_identity, wp_logout_url(get_permalink())); ?></p>71 <p><?php printf(__('Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out »</a>'), get_edit_user_link(), $user_identity, wp_logout_url(get_permalink())); ?></p> 72 72 <?php else : ?> 73 73 <p> -
trunk/wp-includes/theme-compat/comments.php
r19684 r21364 70 70 <?php if ( is_user_logged_in() ) : ?> 71 71 72 <p><?php printf(__('Logged in as <a href="%1$s">%2$s</a>.'), get_ option('siteurl') . '/wp-admin/profile.php', $user_identity); ?> <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="<?php esc_attr_e('Log out of this account'); ?>"><?php _e('Log out »'); ?></a></p>72 <p><?php printf(__('Logged in as <a href="%1$s">%2$s</a>.'), get_edit_user_link(), $user_identity); ?> <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="<?php esc_attr_e('Log out of this account'); ?>"><?php _e('Log out »'); ?></a></p> 73 73 74 74 <?php else : ?> -
trunk/wp-login.php
r21311 r21364 627 627 $redirect_to = get_dashboard_url( $user->ID ); 628 628 elseif ( !$user->has_cap('edit_posts') ) 629 $redirect_to = admin_url('profile.php');629 $redirect_to = get_edit_user_link(); 630 630 } 631 631 wp_safe_redirect($redirect_to);
Note: See TracChangeset
for help on using the changeset viewer.