WordPress filter hook · part of WordPress core
widget_tag_cloud_args
A WordPress core filter that 9 plugins also fire themselves, running on 401K+ sites between them.
“Filters the taxonomy used in the Tag Cloud widget.”
How to use widget_tag_cloud_args
It's a filter: your callback receives the value, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'widget_tag_cloud_args', function( $l_tag_params ) {
// Change $l_tag_params here.
return $l_tag_params;
}, 10, 1 );Argument names come from F2 Tag Cloud Widget's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
This hook is fired by WordPress core too. Official reference on developer.wordpress.org →
9 plugins that fire widget_tag_cloud_args
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Ocean Extra400,000+ installs
apply_filters( 'widget_tag_cloud_args', array( 'taxonomy' => $current_taxonomy, 'echo' => false ) )includes/widgets/tags.php:99 -
Portfolio by BestWebSoft600+ installs
apply_filters( 'widget_tag_cloud_args', array( 'taxonomy' => 'portfolio_technologies', 'number' => 0, ) )includes/class-portfolio-technologies-widget.php:40 -
F2 Tag Cloud Widget500+ installs
apply_filters( 'widget_tag_cloud_args', $l_tag_params )f2-tagcloud.php:101 -
Tag Cloud per Category40+ installs
apply_filters( 'widget_tag_cloud_args', $params )tag-cloud-per-category.php:85 -
Color Bg Tag Cloud30+ installs
apply_filters( 'widget_tag_cloud_args', $l_tag_params )color-bg-tag-cloud.php:62 -
Epic Tap Widgets20+ installs
apply_filters( 'widget_tag_cloud_args', array('taxonomy' => $current_taxonomy, 'format' => 'flat' ) )includes/widgets/widget-tags-cloud.php:104 -
JS Widgets10+ installs
apply_filters( 'widget_tag_cloud_args', array( 'taxonomy' => $item['taxonomy'], ) )core-adapter-widgets/tag_cloud/class.php:126 -
Widget Taxonomy10+ installs
apply_filters( 'widget_tag_cloud_args', array( 'taxonomy' => $taxonomy ) )widget-texonomy .php:92 -
DynamicCategoryTagCloud10+ installs
apply_filters( 'widget_tag_cloud_args', array('taxonomy' => $taxonomy, 'format' => $format, 'orderby' => $orderby, 'order' => $order, 'smallest' => $sfont, 'largest' => $lfont, 'number' => $number) )DynamicCategoryTagCloud.php:83
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.