From de262f553cfaa505b8d16c77e8972137604fe021 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 6 May 2014 21:15:17 +0000 Subject: [PATCH] In `wp-includes/comment-template.php`, remove dead code: * In `get_comment_reply_link()`, `$link` is set twice before it is used. * In `Walker_Comment::start_lvl()`, `case 'ul':` is unreachable unless placed before `default:`. * In `Walker_Comment::end_lvl()`, `case 'ul':` is unreachable unless placed before `default:`. * In `comment_form()`, `$id` is conditionally set and never used. See #27882. Built from https://develop.svn.wordpress.org/trunk@28323 git-svn-id: http://core.svn.wordpress.org/trunk@28151 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment-template.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 6524a2e92a..7af6406621 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -1318,8 +1318,6 @@ function get_comment_reply_link($args = array(), $comment = null, $post = null) if ( !comments_open($post->ID) ) return false; - $link = ''; - if ( get_option('comment_registration') && ! is_user_logged_in() ) $link = '' . $login_text . ''; else @@ -1584,8 +1582,8 @@ class Walker_Comment extends Walker { case 'ol': $output .= '
    ' . "\n"; break; - default: case 'ul': + default: $output .= '
\n"; break; - default: case 'ul': + default: $output .= "\n"; break; } @@ -2045,8 +2043,6 @@ function wp_list_comments( $args = array(), $comments = null ) { function comment_form( $args = array(), $post_id = null ) { if ( null === $post_id ) $post_id = get_the_ID(); - else - $id = $post_id; $commenter = wp_get_current_commenter(); $user = wp_get_current_user();