Ticket #14787: 14787.diff
File 14787.diff, 5.3 KB (added by , 14 years ago) |
---|
-
wp-login.php
547 547 } 548 548 // If the user can't edit posts, send them to their profile. 549 549 if ( !$user->has_cap('edit_posts') && ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' || $redirect_to == admin_url() ) ) 550 $redirect_to = admin_url('profile.php');550 $redirect_to = get_user_edit_link(); 551 551 wp_safe_redirect($redirect_to); 552 552 exit(); 553 553 } -
wp-includes/comment-template.php
1531 1531 'fields' => apply_filters( 'comment_form_default_fields', $fields ), 1532 1532 '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>', 1533 1533 '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>', 1534 '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>',1534 '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_user_edit_link(), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>', 1535 1535 'comment_notes_before' => '<p class="comment-notes">' . __( 'Your email address will not be published.' ) . ( $req ? $required_text : '' ) . '</p>', 1536 1536 '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>', 1537 1537 'id_form' => 'commentform', -
wp-includes/link-template.php
958 958 echo $before . apply_filters( 'edit_bookmark_link', $link, $bookmark->link_id ) . $after; 959 959 } 960 960 961 /** 962 * Retrieve edit user link 963 * 964 * @since 3.1.0 965 * 966 * @param int $user_id Optional. User ID. 967 * @return string 968 */ 969 function get_edit_user_link( $user_id = 0 ) { 970 if ( !$user_id || get_current_user_id() == $user_id ) 971 $link = 'profile.php'; 972 else 973 $link = 'user-edit.php?user_id=' . $user_id; 974 975 return apply_filters( 'get_edit_user_link', self_admin_url( $link ), $user_id ); 976 } 977 961 978 // Navigation links 962 979 963 980 /** -
wp-includes/theme-compat/comments.php
70 70 71 71 <?php if ( is_user_logged_in() ) : ?> 72 72 73 <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 _e('Log out of this account'); ?>"><?php _e('Log out »'); ?></a></p>73 <p><?php printf(__('Logged in as <a href="%1$s">%2$s</a>.'), get_user_edit_link(), $user_identity); ?> <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="<?php _e('Log out of this account'); ?>"><?php _e('Log out »'); ?></a></p> 74 74 75 75 <?php else : ?> 76 76 -
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_user_edit_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
143 143 } 144 144 145 145 if ( !is_wp_error( $errors ) ) { 146 $redirect = (IS_PROFILE_PAGE ? "profile.php?" : "user-edit.php?user_id=$user_id&"). "updated=true";146 $redirect = add_query_arg('updated', true, get_edit_user_link($user_id) ); 147 147 $redirect = add_query_arg('wp_http_referer', urlencode($wp_http_referer), $redirect); 148 148 wp_redirect($redirect); 149 149 exit;