get_pages_query_args
Filters query arguments passed to WP_Query in get_pages.
Usage
add_filter( 'get_pages_query_args', 'wp_kama_get_pages_query_args_filter', 10, 2 ); /** * Function for `get_pages_query_args` filter-hook. * * @param array $query_args Array of arguments passed to WP_Query. * @param array $parsed_args Array of get_pages() arguments. * * @return array */ function wp_kama_get_pages_query_args_filter( $query_args, $parsed_args ){ // filter... return $query_args; }
- $query_args(array)
- Array of arguments passed to WP_Query.
- $parsed_args(array)
- Array of get_pages() arguments.
Changelog
Since 6.3.0 | Introduced. |
Where the hook is called
get_pages_query_args
wp-includes/post.php 6246
$query_args = apply_filters( 'get_pages_query_args', $query_args, $parsed_args );