diff --git a/wp-content/themes/default/comments.php b/wp-content/themes/default/comments.php index cdaf8b4353..a1dcef1286 100644 --- a/wp-content/themes/default/comments.php +++ b/wp-content/themes/default/comments.php @@ -44,10 +44,10 @@
- +
ID); ?> diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 8c3646962b..0b7be3605a 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -908,9 +908,9 @@ function comment_reply_link($args = array(), $comment = null, $post = null) { $link = ''; if ( get_option('comment_registration') && !$user_ID ) - $link = '' . $login_text . ''; + $link = '' . $login_text . ''; else - $link = "$reply_text"; + $link = "comment_ID ) ) . "#respond' onclick='moveAddCommentForm(\"$add_below-$comment->comment_ID\", $comment->comment_ID, \"$respond_id\"); return false;'>$reply_text"; return $before . $link . $after; } @@ -920,14 +920,48 @@ function comment_reply_link($args = array(), $comment = null, $post = null) { * * @since 2.7.0 * - * @param string $text Optional. Text to display for cancel reply. - * @param string $respond_id Optional. HTML ID attribute for JS cancelCommentReply function. - * @param string $respond_root Optional. Second parameter for JS cancelCommentReply function. + * @param string $text Optional. Text to display for cancel reply link. */ -function cancel_comment_reply_link($text = '', $respond_id = 'respond', $respond_root = 'content') { +function cancel_comment_reply_link($text = '') { if ( empty($text) ) $text = __('Click here to cancel reply.'); - echo '' . $text . ''; + + $style = isset($_GET['replytocom']) ? '' : ' style="display:none;"'; + + echo '' . $text . ''; +} + +/** + * Output hidden input HTML for replying to comments. + * + * @since 2.7.0 + */ +function comment_parent_field() { + $replytoid = isset($_GET['replytocom']) ? (int) $_GET['replytocom'] : 0; + echo "\n"; +} + +/** + * Display text based on comment reply status. Only affects users with Javascript disabled. + * + * @since 2.7.0 + * + * @param string $noreplytext Optional. Text to display when not replying to a comment. + * @param string $replytext Optional. Text to display when replying to a comment. Accepts "%s" for the author of the comment being replied to. + * @param string $linktoparent Optional. Boolean to control making the author's name a link to their comment. + */ +function comment_form_title( $noreplytext = 'Leave a Reply', $replytext = 'Leave a Reply to %s', $linktoparent = TRUE ) { + global $comment; + + $replytoid = isset($_GET['replytocom']) ? (int) $_GET['replytocom'] : 0; + + if ( 0 == $replytoid ) + echo $noreplytext; + else { + $comment = get_comment($replytoid); + $author = ( $linktoparent ) ? '' . get_comment_author() . '' : get_comment_author(); + printf( $replytext, $author ); + } } /** @@ -1046,7 +1080,7 @@ class Walker_Comment extends Walker { -