Hide reply link by default. Enable with JS. Props Viper007Bond. see #7635

git-svn-id: https://develop.svn.wordpress.org/trunk@9037 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-09-30 17:27:15 +00:00
parent f32c8bc427
commit 119280586f
3 changed files with 8 additions and 3 deletions

View File

@ -1037,7 +1037,7 @@ class Walker_Comment extends Walker {
<?php echo apply_filters('comment_text', get_comment_text()) ?>
<div class='reply'>
<div class="reply" style="display:none">
<?php echo comment_reply_link(array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['depth'])) ?>
<?php if ( 'ul' == $args['style'] ) : ?>
</div>

View File

@ -32,4 +32,9 @@ function cancelCommentReply(respondId, respondRoot) {
document.location.href = "#respond";
document.getElementById("comment").focus();
document.getElementById("comment-parent").value = "0";
}
}
jQuery(document).ready(function($){
$(".thread-odd").find("div.reply").css("display", "block");
$(".thread-even").find("div.reply").css("display", "block");
});

View File

@ -141,7 +141,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'jquery-ui-resizable', '/wp-includes/js/jquery/ui.resizable.js', array('jquery-ui-core'), '1.5.2' );
$scripts->add( 'jquery-ui-dialog', '/wp-includes/js/jquery/ui.dialog.js', array('jquery-ui-resizable', 'jquery-ui-draggable'), '1.5.2' );
$scripts->add( 'comment-reply', '/wp-includes/js/comment-reply.js', false, '20080828');
$scripts->add( 'comment-reply', '/wp-includes/js/comment-reply.js', array('jquery'), '20080929');
if ( is_admin() ) {
$scripts->add( 'ajaxcat', '/wp-admin/js/cat.js', array( 'wp-lists' ), '20071101' );