mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 19:46:21 +00:00
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');
|
$home = get_option('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 { // if comments_popup_script() is not in the template, display simple comment link
|
} else {
|
||||||
if ( 0 == $number )
|
// if comments_popup_script() is not in the template, display simple comment link
|
||||||
echo get_permalink() . '#respond';
|
if ( 0 == $number ) {
|
||||||
else
|
$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();
|
comments_link();
|
||||||
|
}
|
||||||
echo '"';
|
echo '"';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user