apply_filters( 'widget_tag_cloud_args', array $args , array $instance )
Filters the taxonomy used in the Tag Cloud widget.
Description Description
See also See also
Parameters Parameters
- $args
-
(array) Args used for the tag cloud widget.
- $instance
-
(array) Array of settings for the current widget.
Source Source
Changelog Changelog
| Version | Description |
|---|---|
| 4.9.0 | Added the $instance parameter. |
| 3.0.0 | Added taxonomy drop-down. |
| 2.8.0 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
Modifies tag cloud widget arguments to display all tags in the same font size and use list format for better accessibility.
/** * Modifies tag cloud widget arguments to display all tags in the same font size * and use list format for better accessibility. * * @param array $args Arguments for tag cloud widget. * @return array The filtered arguments for tag cloud widget. */ function prefix_widget_tag_cloud_args( $args ) { $args['largest'] = 1; $args['smallest'] = 1; $args['unit'] = 'em'; $args['format'] = 'list'; return $args; } add_filter( 'widget_tag_cloud_args', 'prefix_widget_tag_cloud_args' 10, 1 );Expand full source codeCollapse full source code