widget_archives_dropdown_args
Filter HookDescription
Filters the arguments for the Archives widget drop-down.Hook Information
File Location |
wp-includes/widgets/class-wp-widget-archives.php
View on GitHub
|
Hook Type | Filter |
Line Number | 76 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$args
|
An array of Archives widget drop-down arguments. |
array
|
$instance
|
Settings for the current Archives widget instance. |
Usage Examples
Basic Usage
<?php
// Hook into widget_archives_dropdown_args
add_filter('widget_archives_dropdown_args', 'my_custom_filter', 10, 2);
function my_custom_filter($args, $instance) {
// Your custom filtering logic here
return $args;
}
Source Code Context
wp-includes/widgets/class-wp-widget-archives.php:76
- How this hook is used in WordPress core
<?php
71 * @see wp_get_archives()
72 *
73 * @param array $args An array of Archives widget drop-down arguments.
74 * @param array $instance Settings for the current Archives widget instance.
75 */
76 $dropdown_args = apply_filters(
77 'widget_archives_dropdown_args',
78 array(
79 'type' => 'monthly',
80 'format' => 'option',
81 'show_post_count' => $count,
PHP Documentation
<?php
/**
* Filters the arguments for the Archives widget drop-down.
*
* @since 2.8.0
* @since 4.9.0 Added the `$instance` parameter.
*
* @see wp_get_archives()
*
* @param array $args An array of Archives widget drop-down arguments.
* @param array $instance Settings for the current Archives widget instance.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-includes/widgets/class-wp-widget-archives.php
Related Hooks
Related hooks will be displayed here in future updates.