Comments: comment_link()
currently takes no arguments, yet get_comment_link()
does. Allow comment_link()
to optionally take the same arguments.
See #33638. git-svn-id: https://develop.svn.wordpress.org/trunk@34071 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6a262bd6ce
commit
dd55363884
@ -291,8 +291,11 @@ function get_comment_guid($comment_id = null) {
|
||||
* Display the link to the comments.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @since 4.4.0 Introduced the `$comment` argument.
|
||||
*
|
||||
* @param int|WP_Comment $comment Optional comment object or id. Defaults to global comment object.
|
||||
*/
|
||||
function comment_link() {
|
||||
function comment_link( $comment = null ) {
|
||||
/**
|
||||
* Filter the current comment's permalink.
|
||||
*
|
||||
@ -302,7 +305,7 @@ function comment_link() {
|
||||
*
|
||||
* @param string $comment_permalink The current comment permalink.
|
||||
*/
|
||||
echo esc_url( apply_filters( 'comment_link', get_comment_link() ) );
|
||||
echo esc_url( apply_filters( 'comment_link', get_comment_link( $comment ) ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user