WordPress.org

Make WordPress Core

Ticket #12932: thread_comments_check.diff

File thread_comments_check.diff, 694 bytes (added by ptahdunbar, 5 years ago)

adds a check for thread_comments so the js doesn't load when it's not needed

  • wp-content/themes/twentyten/header.php

     
    3535        ?></title> 
    3636        <link rel="profile" href="http://gmpg.org/xfn/11" /> 
    3737        <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" /> 
    38         <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?> 
     38        <?php if ( is_singular() && get_option('thread_comments') ) wp_enqueue_script( 'comment-reply' ); ?> 
    3939        <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" /> 
    4040        <?php wp_head(); ?> 
    4141</head>