mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 23:41:38 +01:00
comments_popup_link filter from joostdevalk. fixes #5247
git-svn-id: http://svn.automattic.com/wordpress/trunk@6368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d26bff6a38
commit
c56489c18c
@ -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