widget_pages_args хук-фильтр . WP 2.8.0
Filters the arguments for the Pages widget.
Использование
add_filter( 'widget_pages_args', 'filter_function_name_7409', 10, 2 ); function filter_function_name_7409( $args, $instance ){ // filter... return $args; }
- $args(массив)
- An array of arguments to retrieve the pages list.
- $instance(массив)
- Array of settings for the current widget.
Список изменений
С версии 2.8.0 | Введена. |
С версии 4.9.0 | Added the $instance parameter. |
Где вызывается хук
wp-includes/widgets/class-wp-widget-pages.php 76-85
apply_filters( 'widget_pages_args', array( 'title_li' => '', 'echo' => 0, 'sort_column' => $sortby, 'exclude' => $exclude, ), $instance )