Ticket #20307: 14787-20307-merge.patch
File 14787-20307-merge.patch, 6.3 KB (added by , 12 years ago) |
---|
-
wp-login.php
630 630 elseif ( is_multisite() && !$user->has_cap('read') ) 631 631 $redirect_to = get_dashboard_url( $user->ID ); 632 632 elseif ( !$user->has_cap('edit_posts') ) 633 $redirect_to = admin_url('profile.php');633 $redirect_to = get_edit_user_link(); 634 634 } 635 635 wp_safe_redirect($redirect_to); 636 636 exit(); -
wp-includes/admin-bar.php
470 470 'title' => $tax->labels->edit_item, 471 471 'href' => get_edit_term_link( $current_object->term_id, $current_object->taxonomy ) 472 472 ) ); 473 } elseif ( is_a( $current_object, 'WP_User' ) 474 && current_user_can( 'edit_user', $current_object->ID ) ) 475 { 476 if ( get_current_user_id() == $current_object->ID ) 477 $title = __( 'Edit My Profile' ); 478 else 479 $title = __( 'Edit User' ); 480 $wp_admin_bar->add_menu( array( 481 'id' => 'edit', 482 'title' => $title, 483 'href' => get_edit_user_link( $current_object->ID ) 484 ) ); 473 485 } 474 486 } 475 487 } -
wp-includes/comment-template.php
1537 1537 'fields' => apply_filters( 'comment_form_default_fields', $fields ), 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>', 1543 1543 'id_form' => 'commentform', -
wp-includes/link-template.php
1054 1054 echo $before . apply_filters( 'edit_bookmark_link', $link, $bookmark->link_id ) . $after; 1055 1055 } 1056 1056 1057 /** 1058 * Retrieve edit user link 1059 * 1060 * @since 3.5.0 1061 * 1062 * @param int $user_id Optional. User ID. 1063 * @return string 1064 */ 1065 function get_edit_user_link( $user_id = null ) { 1066 if ( ! $user_id ) 1067 $user_id = get_current_user_id(); 1068 1069 if ( empty( $user_id ) || ! current_user_can( 'edit_user', $user_id ) ) 1070 return; 1071 1072 $user = new WP_User( $user_id ); 1073 1074 if( empty( $user ) ) 1075 return; 1076 1077 if ( get_current_user_id() == $user->ID ) 1078 $link = self_admin_url( 'profile.php' ); 1079 else 1080 $link = add_query_arg( 'user_id', $user->ID, self_admin_url( 'user-edit.php' ) ); 1081 1082 return apply_filters( 'get_edit_user_link', $link, $user->ID ); 1083 } 1084 1057 1085 // Navigation links 1058 1086 1059 1087 /** -
wp-includes/theme-compat/comments.php
69 69 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 : ?> 75 75 -
wp-includes/theme-compat/comments-popup.php
68 68 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> 74 74 <input type="text" name="author" id="author" class="textarea" value="<?php echo esc_attr($comment_author); ?>" size="28" tabindex="1" /> -
wp-admin/user-edit.php
139 139 } 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); 145 145 wp_redirect($redirect);