From 2672e35d43cbb77b274f9208267501b315e789fb Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 27 Oct 2014 11:44:40 +0000 Subject: [PATCH] Add 'comment_reply_link_args' filter for get_comment_reply_link() arguments. props joedolson, aaroncampbell, DrewAPicture. fixes #10569. git-svn-id: https://develop.svn.wordpress.org/trunk@30039 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/comment-template.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/wp-includes/comment-template.php b/src/wp-includes/comment-template.php index 9bd0596581..ab03817ff6 100644 --- a/src/wp-includes/comment-template.php +++ b/src/wp-includes/comment-template.php @@ -1339,6 +1339,18 @@ function get_comment_reply_link( $args = array(), $comment = null, $post = null return false; } + /** + * Filter the comment reply link arguments. + * + * @since 4.1.0 + * + * @param array $args Comment reply link arguments. See {@see get_comment_reply_link()} + * for more information on accepted arguments. + * @param object $comment The object of the comment being replied to. + * @param WP_Post $post The WP_Post object. + */ + $args = apply_filters( 'comment_reply_link_args', $args, $comment, $post ); + if ( get_option( 'comment_registration' ) && ! is_user_logged_in() ) { $link = sprintf( '%s', esc_url( wp_login_url( get_permalink() ) ),