From d7a159bf810929bd96579eb5d74496ece694ab19 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 6 May 2014 11:57:36 +0000 Subject: [PATCH] Add a filter for wp_list_comments() arguments. props greenshady, hlashbrooke. fixes #19581. git-svn-id: https://develop.svn.wordpress.org/trunk@28285 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/comment-template.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/wp-includes/comment-template.php b/src/wp-includes/comment-template.php index 978221f980..6524a2e92a 100644 --- a/src/wp-includes/comment-template.php +++ b/src/wp-includes/comment-template.php @@ -1918,6 +1918,15 @@ function wp_list_comments( $args = array(), $comments = null ) { $r = wp_parse_args( $args, $defaults ); + /** + * Filter the arguments used in retrieving the comment list. + * + * @since 4.0.0 + * + * @param array $r An array of arguments for displaying comments. + */ + $r = apply_filters( 'wp_list_comments_args', $r ); + // Figure out what comments we'll be looping through ($_comments) if ( null !== $comments ) { $comments = (array) $comments;