comments_popup_link filter from joostdevalk. fixes #5247
git-svn-id: https://develop.svn.wordpress.org/trunk@6368 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
bdeb4e3663
commit
340228e4ad
@ -338,29 +338,30 @@ function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Com
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<a href="';
|
$comments_popup_link = '<a href="';
|
||||||
if ($wpcommentsjavascript) {
|
if ($wpcommentsjavascript) {
|
||||||
if ( empty($wpcommentspopupfile) )
|
if ( empty($wpcommentspopupfile) )
|
||||||
$home = get_option('home');
|
$home = get_option('home');
|
||||||
else
|
else
|
||||||
$home = get_option('siteurl');
|
$home = get_option('siteurl');
|
||||||
echo $home . '/' . $wpcommentspopupfile.'?comments_popup='.$id;
|
$comments_popup_link .= $home . '/' . $wpcommentspopupfile.'?comments_popup='.$id;
|
||||||
echo '" onclick="wpopen(this.href); return false"';
|
$comments_popup_link .= '" onclick="wpopen(this.href); return false"';
|
||||||
} else { // if comments_popup_script() is not in the template, display simple comment link
|
} else { // if comments_popup_script() is not in the template, display simple comment link
|
||||||
if ( 0 == $number )
|
if ( 0 == $number )
|
||||||
echo get_permalink() . '#respond';
|
$comments_popup_link .= get_permalink() . '#respond';
|
||||||
else
|
else
|
||||||
comments_link();
|
$comments_popup_link .= comments_link();
|
||||||
echo '"';
|
$comments_popup_link .= '"';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($CSSclass)) {
|
if (!empty($CSSclass)) {
|
||||||
echo ' class="'.$CSSclass.'"';
|
$comments_popup_link .= ' class="'.$CSSclass.'"';
|
||||||
}
|
}
|
||||||
$title = attribute_escape(get_the_title());
|
$title = attribute_escape(get_the_title());
|
||||||
echo ' title="' . sprintf( __('Comment on %s'), $title ) .'">';
|
$comments_popup_link .= ' title="' . sprintf( __('Comment on %s'), $title ) .'">';
|
||||||
comments_number($zero, $one, $more, $number);
|
comments_number($zero, $one, $more, $number);
|
||||||
echo '</a>';
|
$comments_popup_link .= '</a>';
|
||||||
|
echo apply_filters('comments_popup_link', $comments_popup_link);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user