From 5530fe4c116696a7ab4131416c27d6a79d35d07c Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 6 May 2014 21:14:35 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@28323 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/comment-template.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/wp-includes/comment-template.php b/src/wp-includes/comment-template.php index 6524a2e92a..7af6406621 100644 --- a/src/wp-includes/comment-template.php +++ b/src/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();