From d70e8a38fa8da7e806816aea171151fe74f56808 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 6 May 2014 11:58:14 +0000 Subject: [PATCH] Add a filter for wp_list_comments() arguments. props greenshady, hlashbrooke. fixes #19581. Built from https://develop.svn.wordpress.org/trunk@28285 git-svn-id: http://core.svn.wordpress.org/trunk@28113 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment-template.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 978221f980..6524a2e92a 100644 --- a/wp-includes/comment-template.php +++ b/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;