Apply the new `'respond_link'` filter in `comments_popup_link()` if `$number` is `0` before outputting the URL.
Props joedolson. Fixes #29454. Built from https://develop.svn.wordpress.org/trunk@34216 git-svn-id: http://core.svn.wordpress.org/trunk@34180 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8573a86def
commit
4139daea5e
|
@ -1341,11 +1341,22 @@ function comments_popup_link( $zero = false, $one = false, $more = false, $css_c
|
|||
$home = get_option('siteurl');
|
||||
echo $home . '/' . $wpcommentspopupfile . '?comments_popup=' . $id;
|
||||
echo '" onclick="wpopen(this.href); return false"';
|
||||
} else { // if comments_popup_script() is not in the template, display simple comment link
|
||||
if ( 0 == $number )
|
||||
echo get_permalink() . '#respond';
|
||||
else
|
||||
} else {
|
||||
// if comments_popup_script() is not in the template, display simple comment link
|
||||
if ( 0 == $number ) {
|
||||
$respond_link = get_permalink() . '#respond';
|
||||
/**
|
||||
* Filter the respond link when a post has no comments.
|
||||
*
|
||||
* @since 4.4.0
|
||||
*
|
||||
* @param string $respond_link The default response link.
|
||||
* @param integer $id The post ID.
|
||||
*/
|
||||
echo apply_filters( 'respond_link', $respond_link, $id );
|
||||
} else {
|
||||
comments_link();
|
||||
}
|
||||
echo '"';
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-alpha-34215';
|
||||
$wp_version = '4.4-alpha-34216';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue