Changeset 44659 for trunk/src/wp-includes/comment-template.php
- Timestamp:
- 01/21/2019 01:33:50 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment-template.php
r44457 r44659 1373 1373 if ( $user_ID ) { 1374 1374 $comment_args['include_unapproved'] = array( $user_ID ); 1375 } elseif ( ! empty( $comment_author_email ) ) { 1376 $comment_args['include_unapproved'] = array( $comment_author_email ); 1375 } else { 1376 $unapproved_email = wp_get_unapproved_comment_author_email(); 1377 1378 if ( $unapproved_email ) { 1379 $comment_args['include_unapproved'] = array( $unapproved_email ); 1380 } 1377 1381 } 1378 1382 … … 1691 1695 $link = sprintf( 1692 1696 "<a rel='nofollow' class='comment-reply-link' href='%s' %s aria-label='%s'>%s</a>", 1693 esc_url( add_query_arg( 'replytocom', $comment->comment_ID ) ) . '#' . $args['respond_id'], 1697 esc_url( 1698 add_query_arg( 1699 array( 1700 'replytocom' => $comment->comment_ID, 1701 'unapproved' => false, 1702 'moderation-hash' => false, 1703 ) 1704 ) 1705 ) . '#' . $args['respond_id'], 1694 1706 $data_attribute_string, 1695 1707 esc_attr( sprintf( $args['reply_to_text'], $comment->comment_author ) ), … … 1833 1845 1834 1846 $style = isset( $_GET['replytocom'] ) ? '' : ' style="display:none;"'; 1835 $link = esc_html( remove_query_arg( 'replytocom') ) . '#respond';1847 $link = esc_html( remove_query_arg( array( 'replytocom', 'unapproved', 'moderation-hash' ) ) ) . '#respond'; 1836 1848 1837 1849 $formatted_link = '<a rel="nofollow" id="cancel-comment-reply-link" href="' . $link . '"' . $style . '>' . $text . '</a>'; … … 2056 2068 $comment_args['include_unapproved'] = get_current_user_id(); 2057 2069 } else { 2058 $commenter = wp_get_current_commenter(); 2059 if ( $commenter['comment_author_email'] ) { 2060 $comment_args['include_unapproved'] = $commenter['comment_author_email']; 2070 $unapproved_email = wp_get_unapproved_comment_author_email(); 2071 2072 if ( $unapproved_email ) { 2073 $comment_args['include_unapproved'] = array( $unapproved_email ); 2061 2074 } 2062 2075 }
Note: See TracChangeset
for help on using the changeset viewer.