Indentation and correct response link when no comments, fixes #1408
git-svn-id: https://develop.svn.wordpress.org/trunk@2685 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8ed932864f
commit
8addfabdd7
@ -93,7 +93,7 @@ function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Com
|
|||||||
global $comment_count_cache;
|
global $comment_count_cache;
|
||||||
|
|
||||||
if (! is_single() && ! is_page()) {
|
if (! is_single() && ! is_page()) {
|
||||||
if ( !isset($comment_count_cache[$id]))
|
if ( !isset($comment_count_cache[$id]) )
|
||||||
$comment_count_cache[$id] = $wpdb->get_var("SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved = '1';");
|
$comment_count_cache[$id] = $wpdb->get_var("SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved = '1';");
|
||||||
|
|
||||||
$number = $comment_count_cache[$id];
|
$number = $comment_count_cache[$id];
|
||||||
@ -116,8 +116,10 @@ function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Com
|
|||||||
$home = get_settings('siteurl');
|
$home = get_settings('siteurl');
|
||||||
echo $home . '/' . $wpcommentspopupfile.'?comments_popup='.$id;
|
echo $home . '/' . $wpcommentspopupfile.'?comments_popup='.$id;
|
||||||
echo '" onclick="wpopen(this.href); return false"';
|
echo '" onclick="wpopen(this.href); return false"';
|
||||||
} else {
|
} else { // if comments_popup_script() is not in the template, display simple comment link
|
||||||
// if comments_popup_script() is not in the template, display simple comment link
|
if ( 0 == $number )
|
||||||
|
echo get_permalink() . '#respond';
|
||||||
|
else
|
||||||
comments_link();
|
comments_link();
|
||||||
echo '"';
|
echo '"';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user