From 1cbda0e1ebd7e93d16b6080947b7765a7e54efae Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sat, 12 Sep 2015 03:16:23 +0000 Subject: [PATCH] Comments: `comment_link()` currently takes no arguments, yet `get_comment_link()` does. Allow `comment_link()` to optionally take the same arguments. See #33638. Built from https://develop.svn.wordpress.org/trunk@34071 git-svn-id: http://core.svn.wordpress.org/trunk@34039 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/feed.php | 7 +++++-- wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/wp-includes/feed.php b/wp-includes/feed.php index 0914cd7c03..eef23318b4 100644 --- a/wp-includes/feed.php +++ b/wp-includes/feed.php @@ -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 ) ) ); } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 970407c501..674b9e0f92 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34070'; +$wp_version = '4.4-alpha-34071'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.