widget_tag_cloud_args
Filters the taxonomy used in the Tag Cloud widget.
Usage
add_filter( 'widget_tag_cloud_args', 'wp_kama_widget_tag_cloud_args_filter', 10, 2 ); /** * Function for `widget_tag_cloud_args` filter-hook. * * @param array $args Args used for the tag cloud widget. * @param array $instance Array of settings for the current widget. * * @return array */ function wp_kama_widget_tag_cloud_args_filter( $args, $instance ){ // filter... return $args; }
- $args(array)
- Args used for the tag cloud widget.
- $instance(array)
- Array of settings for the current widget.
Changelog
Since 2.8.0 | Introduced. |
Since 3.0.0 | Added taxonomy drop-down. |
Since 4.9.0 | Added the $instance parameter. |
Where the hook is called
wp-includes/widgets/class-wp-widget-tag-cloud.php 73-81
apply_filters( 'widget_tag_cloud_args', array( 'taxonomy' => $current_taxonomy, 'echo' => false, 'show_count' => $show_count, ), $instance )