Changeset 25562 for trunk/src/wp-includes/comment-template.php
- Timestamp:
- 09/22/2013 10:15:38 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment-template.php
r25555 r25562 138 138 /** 139 139 * Retrieve the HTML link to the URL of the author of the current comment. 140 * 140 * 141 141 * Both get_comment_author_url() and get_comment_author() rely on get_comment(), 142 142 * which falls back to the global comment variable if the $comment_ID argument is empty. … … 1069 1069 */ 1070 1070 function get_comment_reply_link($args = array(), $comment = null, $post = null) { 1071 global $user_ID;1072 1071 1073 1072 $defaults = array( … … 1098 1097 $link = ''; 1099 1098 1100 if ( get_option('comment_registration') && ! $user_ID)1099 if ( get_option('comment_registration') && ! is_user_logged_in() ) 1101 1100 $link = '<a rel="nofollow" class="comment-reply-login" href="' . esc_url( wp_login_url( get_permalink() ) ) . '">' . $login_text . '</a>'; 1102 1101 else … … 1152 1151 */ 1153 1152 function get_post_reply_link($args = array(), $post = null) { 1154 global $user_ID; 1155 1156 $defaults = array('add_below' => 'post', 'respond_id' => 'respond', 'reply_text' => __('Leave a Comment'), 1157 'login_text' => __('Log in to leave a Comment'), 'before' => '', 'after' => ''); 1153 $defaults = array( 1154 'add_below' => 'post', 1155 'respond_id' => 'respond', 1156 'reply_text' => __('Leave a Comment'), 1157 'login_text' => __('Log in to leave a Comment'), 1158 'before' => '', 1159 'after' => '', 1160 ); 1158 1161 1159 1162 $args = wp_parse_args($args, $defaults); … … 1164 1167 return false; 1165 1168 1166 if ( get_option('comment_registration') && ! $user_ID) {1169 if ( get_option('comment_registration') && ! is_user_logged_in() ) { 1167 1170 $link = '<a rel="nofollow" href="' . wp_login_url( get_permalink() ) . '">' . $login_text . '</a>'; 1168 1171 } else { … … 1174 1177 /** 1175 1178 * Displays the HTML content for reply to post link. 1176 * 1179 * 1177 1180 * @since 2.7.0 1178 1181 *
Note: See TracChangeset
for help on using the changeset viewer.