diff --git wp-comments-post.php wp-comments-post.php
index 9c17a35..4516258 100644
|
|
if ( $user->ID ) { |
73 | 73 | |
74 | 74 | $comment_type = ''; |
75 | 75 | |
76 | | if ( get_option('require_name_email') && !$user->ID ) { |
| 76 | if ( get_option('require_name_email') && ! is_user_logged_in() ) { |
77 | 77 | if ( 6 > strlen($comment_author_email) || '' == $comment_author ) |
78 | 78 | wp_die( __('Error: please fill the required fields (name, email).') ); |
79 | 79 | elseif ( !is_email($comment_author_email)) |
… |
… |
$commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_emai |
90 | 90 | $comment_id = wp_new_comment( $commentdata ); |
91 | 91 | |
92 | 92 | $comment = get_comment($comment_id); |
93 | | if ( !$user->ID ) { |
| 93 | if ( ! is_user_logged_in() ) { |
94 | 94 | $comment_cookie_lifetime = apply_filters('comment_cookie_lifetime', 30000000); |
95 | 95 | setcookie('comment_author_' . COOKIEHASH, $comment->comment_author, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN); |
96 | 96 | setcookie('comment_author_email_' . COOKIEHASH, $comment->comment_author_email, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN); |
diff --git wp-includes/comment-template.php wp-includes/comment-template.php
index d00c659..31e2ce7 100644
|
|
function comments_popup_link( $zero = false, $one = false, $more = false, $css_c |
1034 | 1034 | * @return string|bool|null Link to show comment form, if successful. False, if comments are closed. |
1035 | 1035 | */ |
1036 | 1036 | function get_comment_reply_link($args = array(), $comment = null, $post = null) { |
1037 | | global $user_ID; |
1038 | | |
1039 | 1037 | $defaults = array('add_below' => 'comment', 'respond_id' => 'respond', 'reply_text' => __('Reply'), |
1040 | 1038 | 'login_text' => __('Log in to Reply'), 'depth' => 0, 'before' => '', 'after' => ''); |
1041 | 1039 | |
… |
… |
function get_comment_reply_link($args = array(), $comment = null, $post = null) |
1056 | 1054 | |
1057 | 1055 | $link = ''; |
1058 | 1056 | |
1059 | | if ( get_option('comment_registration') && !$user_ID ) |
| 1057 | if ( get_option('comment_registration') && ! is_user_logged_in() ) |
1060 | 1058 | $link = '<a rel="nofollow" class="comment-reply-login" href="' . esc_url( wp_login_url( get_permalink() ) ) . '">' . $login_text . '</a>'; |
1061 | 1059 | else |
1062 | 1060 | $link = "<a class='comment-reply-link' href='" . esc_url( add_query_arg( 'replytocom', $comment->comment_ID ) ) . "#" . $respond_id . "' onclick='return addComment.moveForm(\"$add_below-$comment->comment_ID\", \"$comment->comment_ID\", \"$respond_id\", \"$post->ID\")'>$reply_text</a>"; |
… |
… |
function comment_reply_link($args = array(), $comment = null, $post = null) { |
1095 | 1093 | * @return string|bool|null Link to show comment form, if successful. False, if comments are closed. |
1096 | 1094 | */ |
1097 | 1095 | function get_post_reply_link($args = array(), $post = null) { |
1098 | | global $user_ID; |
1099 | | |
1100 | 1096 | $defaults = array('add_below' => 'post', 'respond_id' => 'respond', 'reply_text' => __('Leave a Comment'), |
1101 | 1097 | 'login_text' => __('Log in to leave a Comment'), 'before' => '', 'after' => ''); |
1102 | 1098 | |
… |
… |
function get_post_reply_link($args = array(), $post = null) { |
1107 | 1103 | if ( !comments_open($post->ID) ) |
1108 | 1104 | return false; |
1109 | 1105 | |
1110 | | if ( get_option('comment_registration') && !$user_ID ) { |
| 1106 | if ( get_option('comment_registration') && ! is_user_logged_in() ) { |
1111 | 1107 | $link = '<a rel="nofollow" href="' . wp_login_url( get_permalink() ) . '">' . $login_text . '</a>'; |
1112 | 1108 | } else { |
1113 | 1109 | $link = "<a rel='nofollow' class='comment-reply-link' href='" . get_permalink($post->ID) . "#$respond_id' onclick='return addComment.moveForm(\"$add_below-$post->ID\", \"0\", \"$respond_id\", \"$post->ID\")'>$reply_text</a>"; |
diff --git wp-includes/ms-deprecated.php wp-includes/ms-deprecated.php
index a7f7eb2..c307f04 100644
|
|
function is_site_admin( $user_login = '' ) { |
44 | 44 | _deprecated_function( __FUNCTION__, '3.0', 'is_super_admin()' ); |
45 | 45 | |
46 | 46 | if ( empty( $user_login ) ) { |
47 | | $user_id = get_current_user_id(); |
48 | | if ( !$user_id ) |
| 47 | if ( ! is_user_logged_in() ) |
49 | 48 | return false; |
50 | 49 | } else { |
51 | 50 | $user = get_user_by( 'login', $user_login ); |