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

git-svn-id: http://svn.automattic.com/wordpress/trunk@9037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-09-30 17:27:15 +00:00
parent e3cc331835
commit eef17ba0a5
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' );