widget_comments_args WordPress Filter Hook

The widget_comments_args hook allows you to modify the default arguments used when retrieving comments for a widget. This can be useful if you want to change the number of comments displayed or the order in which they are displayed.

apply_filters( 'widget_comments_args', array $comment_args, array $instance ) #

Filters the arguments for the Recent Comments widget.


Description

Top ↑

See also


Top ↑

Parameters

$comment_args

(array)An array of arguments used to retrieve the recent comments.

$instance

(array)Array of settings for the current widget.


Top ↑

Source

File: wp-includes/widgets/class-wp-widget-recent-comments.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.9.0Added the $instance parameter.
3.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.