widget_archives_args хук-фильтр . WP 2.8.0
Filters the arguments for the Archives widget.
Использование
add_filter( 'widget_archives_args', 'filter_function_name_1062', 10, 2 ); function filter_function_name_1062( $args, $instance ){ // filter... return $args; }
- $args(массив)
- An array of Archives option arguments.
- $instance(массив)
- Array of settings for the current widget.
Список изменений
С версии 2.8.0 | Введена. |
С версии 4.9.0 | Added the $instance parameter. |
Где вызывается хук
widget_archives_args
wp-includes/widgets/class-wp-widget-archives.php 153-160
apply_filters( 'widget_archives_args', array( 'type' => 'monthly', 'show_post_count' => $count, ), $instance )
wp-includes/blocks/archives.php 77-83
$archives_args = apply_filters( 'widget_archives_args', array( 'type' => 'monthly', 'show_post_count' => $show_post_count, ) );