On this page
apply_filters( 'widget_posts_args', array $args, array $instance )
Filters the arguments for the Recent Posts widget.
Description
See also
Parameters
$argsarray-
An array of arguments used to retrieve the recent posts.
$instancearray-
Array of settings for the current widget.
More Information
Use any of the WP_Query parameters for $args.
Source
File: wp-includes/widgets/class-wp-widget-recent-posts.php. View all references
apply_filters(
'widget_posts_args',
array(
'posts_per_page' => $number,
'no_found_rows' => true,
'post_status' => 'publish',
'ignore_sticky_posts' => true,
),
$instance
)
Related
Used By
| Used By | Description |
|---|---|
| WP_Widget_Recent_Posts::widget() wp-includes/widgets/class-wp-widget-recent-posts.php | Outputs the content for the current Recent Posts widget instance. |
Changelog
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/widget_posts_args