WordPress.org

Make WordPress Core

Changeset 6368


Ignore:
Timestamp:
12/10/2007 06:53:58 AM (10 years ago)
Author:
ryan
Message:

comments_popup_link filter from joostdevalk. fixes #5247

File:
1 edited

Legend:

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

    r6364 r6368  
    339339    }
    340340
    341     echo '<a href="';
     341    $comments_popup_link = '<a href="';
    342342    if ($wpcommentsjavascript) {
    343343        if ( empty($wpcommentspopupfile) )
     
    345345        else
    346346            $home = get_option('siteurl');
    347         echo $home . '/' . $wpcommentspopupfile.'?comments_popup='.$id;
    348         echo '" onclick="wpopen(this.href); return false"';
     347        $comments_popup_link .= $home . '/' . $wpcommentspopupfile.'?comments_popup='.$id;
     348        $comments_popup_link .= '" onclick="wpopen(this.href); return false"';
    349349    } else { // if comments_popup_script() is not in the template, display simple comment link
    350350        if ( 0 == $number )
    351             echo get_permalink() . '#respond';
     351            $comments_popup_link .= get_permalink() . '#respond';
    352352        else
    353             comments_link();
    354         echo '"';
     353            $comments_popup_link .=  comments_link();
     354        $comments_popup_link .=  '"';
    355355    }
    356356
    357357    if (!empty($CSSclass)) {
    358         echo ' class="'.$CSSclass.'"';
     358        $comments_popup_link .= ' class="'.$CSSclass.'"';
    359359    }
    360360    $title = attribute_escape(get_the_title());
    361     echo ' title="' . sprintf( __('Comment on %s'), $title ) .'">';
     361    $comments_popup_link .= ' title="' . sprintf( __('Comment on %s'), $title ) .'">';
    362362    comments_number($zero, $one, $more, $number);
    363     echo '</a>';
     363    $comments_popup_link .= '</a>';
     364    echo apply_filters('comments_popup_link', $comments_popup_link);
    364365}
    365366
Note: See TracChangeset for help on using the changeset viewer.