widget_tag_cloud_args
Filters the taxonomy used in the Tag Cloud widget.
Description
Parameters (1)
- 0. $array — Optional. (callback) =>
array( 'taxonomy' => $current_taxonomy, 'echo' => false )
- Args used for the tag cloud widget.
Usage
- To run the hook, copy the example below.
- $array = apply_filters( 'widget_tag_cloud_args', $array );
- if ( !empty( $array ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the widget_tag_cloud_args callback
- function filter_widget_tag_cloud_args( $array ) {
- // make filter magic happen here...
- return $array;
- };
- // add the filter
- add_filter( 'widget_tag_cloud_args', 'filter_widget_tag_cloud_args', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'widget_tag_cloud_args', 'filter_widget_tag_cloud_args', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /wp-includes/widgets/class-wp-widget-tag-cloud.php
- $tag_cloud = wp_tag_cloud( apply_filters( 'widget_tag_cloud_args', array(