Ticket #7552: show-threaded-reply-via-js.diff
File show-threaded-reply-via-js.diff, 1.6 KB (added by , 16 years ago) |
---|
-
wp-includes/comment-template.php
1037 1037 1038 1038 <?php echo apply_filters('comment_text', get_comment_text()) ?> 1039 1039 1040 <div class= 'reply'>1040 <div class="reply" style="display:none"> 1041 1041 <?php echo comment_reply_link(array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['depth'])) ?> 1042 1042 <?php if ( 'ul' == $args['style'] ) : ?> 1043 1043 </div> … … 1142 1142 $walker->paged_walk($comments, $depth, $page, $per_page, $r); 1143 1143 $wp_query->max_num_comment_pages = $walker->max_pages; 1144 1144 } 1145 1146 // Show "Reply" links 1147 echo "<script type='text/javascript'>if ( typeof showCommentReplyLinks != 'undefined' ) { showCommentReplyLinks(); }</script>\n"; 1145 1148 } 1146 1149 1147 1150 ?> 1151 No newline at end of file -
wp-includes/js/comment-reply.js
32 32 document.location.href = "#respond"; 33 33 document.getElementById("comment").focus(); 34 34 document.getElementById("comment-parent").value = "0"; 35 } 36 37 function showCommentReplyLinks() { 38 var divs = document.getElementsByTagName("div"); 39 var divsLength = divs.length; 40 for (i = 0; i < divsLength; i++) { 41 if ( "reply" == divs[i].className && "none" == divs[i].style.display ) { 42 divs[i].style.display = "block"; 43 } 44 } 35 45 } 46 No newline at end of file