WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/06/2014 09:14:35 PM (8 years ago)
Author:
wonderboymusic
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/comment-template.php

    r28285 r28323  
    13191319        return false;
    13201320
    1321     $link = '';
    1322 
    13231321    if ( get_option('comment_registration') && ! is_user_logged_in() )
    13241322        $link = '<a rel="nofollow" class="comment-reply-login" href="' . esc_url( wp_login_url( get_permalink() ) ) . '">' . $login_text . '</a>';
     
    15851583                $output .= '<ol class="children">' . "\n";
    15861584                break;
     1585            case 'ul':
    15871586            default:
    1588             case 'ul':
    15891587                $output .= '<ul class="children">' . "\n";
    15901588                break;
     
    16121610                $output .= "</ol><!-- .children -->\n";
    16131611                break;
     1612            case 'ul':
    16141613            default:
    1615             case 'ul':
    16161614                $output .= "</ul><!-- .children -->\n";
    16171615                break;
     
    20462044    if ( null === $post_id )
    20472045        $post_id = get_the_ID();
    2048     else
    2049         $id = $post_id;
    20502046
    20512047    $commenter = wp_get_current_commenter();
Note: See TracChangeset for help on using the changeset viewer.