widget_pages_args WordPress Filter Hook
The widget_pages_args hook allows you to modify the arguments that are used when querying for pages. This can be useful for setting up custom page templates or for restricting the pages that are displayed in a widget.
apply_filters( 'widget_pages_args', array $args , array $instance ) #
Filters the arguments for the Pages widget.
Description
See also
Parameters
- $args
(array)An array of arguments to retrieve the pages list.
- $instance
(array)Array of settings for the current widget.
Source
Changelog
Version | Description |
---|---|
4.9.0 | Added the $instance parameter. |
2.8.0 | Introduced. |