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

Top ↑

See also


Top ↑

Parameters

$args

(array)An array of arguments to retrieve the pages list.

$instance

(array)Array of settings for the current widget.


Top ↑

Source

File: wp-includes/widgets/class-wp-widget-pages.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.9.0Added the $instance parameter.
2.8.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.