Filter hook 'widget_tag_cloud_args'

in WP Core File wp-includes/widgets/class-wp-widget-tag-cloud.php at line 73

View Source

widget_tag_cloud_args

Filter Hook
Description
Filters the taxonomy used in the Tag Cloud widget.

Hook Information

File Location wp-includes/widgets/class-wp-widget-tag-cloud.php View on GitHub
Hook Type Filter
Line Number 73

Hook Parameters

Type Name Description
array $args Args used for the tag cloud widget.
array $instance Array of settings for the current widget.

Usage Examples

Basic Usage
<?php
// Hook into widget_tag_cloud_args
add_filter('widget_tag_cloud_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-tag-cloud.php:73 - How this hook is used in WordPress core
<?php
  68  			 * @see wp_tag_cloud()
  69  			 *
  70  			 * @param array $args     Args used for the tag cloud widget.
  71  			 * @param array $instance Array of settings for the current widget.
  72  			 */
  73  			apply_filters(
  74  				'widget_tag_cloud_args',
  75  				array(
  76  					'taxonomy'   => $current_taxonomy,
  77  					'echo'       => false,
  78  					'show_count' => $show_count,

PHP Documentation

<?php
/**
			 * Filters the taxonomy used in the Tag Cloud widget.
			 *
			 * @since 2.8.0
			 * @since 3.0.0 Added taxonomy drop-down.
			 * @since 4.9.0 Added the `$instance` parameter.
			 *
			 * @see wp_tag_cloud()
			 *
			 * @param array $args     Args used for the tag cloud widget.
			 * @param array $instance Array of settings for the current widget.
			 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-includes/widgets/class-wp-widget-tag-cloud.php
Related Hooks

Related hooks will be displayed here in future updates.