widget_categories_dropdown_args filter-hookWP 2.8.0

Filters the arguments for the Categories widget drop-down.

Usage

add_filter( 'widget_categories_dropdown_args', 'wp_kama_widget_categories_dropdown_args_filter', 10, 2 );

/**
 * Function for `widget_categories_dropdown_args` filter-hook.
 * 
 * @param array $cat_args An array of Categories widget drop-down arguments.
 * @param array $instance Array of settings for the current widget.
 *
 * @return array
 */
function wp_kama_widget_categories_dropdown_args_filter( $cat_args, $instance ){

	// filter...
	return $cat_args;
}
$cat_args(array)
An array of Categories widget drop-down arguments.
$instance(array)
Array of settings for the current widget.

Changelog

Since 2.8.0 Introduced.
Since 4.9.0 Added the $instance parameter.

Where the hook is called

WP_Widget_Categories::widget()
widget_categories_dropdown_args
wp-includes/widgets/class-wp-widget-categories.php 91
wp_dropdown_categories( apply_filters( 'widget_categories_dropdown_args', $cat_args, $instance ) );

Where the hook is used in WordPress

Usage not found.