Filter hook 'wp_generate_tag_cloud_data'

in WP Core File wp-includes/category-template.php at line 999

View Source

wp_generate_tag_cloud_data

Filter Hook
Description
Filters the data used to generate the tag cloud.

Hook Information

File Location wp-includes/category-template.php View on GitHub
Hook Type Filter
Line Number 999

Hook Parameters

Type Name Description
array[] $tags_data An array of term data arrays for terms used to generate the tag cloud.

Usage Examples

Basic Usage
<?php
// Hook into wp_generate_tag_cloud_data
add_filter('wp_generate_tag_cloud_data', 'my_custom_filter', 10, 1);

function my_custom_filter($tags_data) {
    // Your custom filtering logic here
    return $tags_data;
}

Source Code Context

wp-includes/category-template.php:999 - How this hook is used in WordPress core
<?php
 994  	 *
 995  	 * @since 4.3.0
 996  	 *
 997  	 * @param array[] $tags_data An array of term data arrays for terms used to generate the tag cloud.
 998  	 */
 999  	$tags_data = apply_filters( 'wp_generate_tag_cloud_data', $tags_data );
1000  
1001  	$a = array();
1002  
1003  	// Generate the output links array.
1004  	foreach ( $tags_data as $key => $tag_data ) {

PHP Documentation

<?php
/**
	 * Filters the data used to generate the tag cloud.
	 *
	 * @since 4.3.0
	 *
	 * @param array[] $tags_data An array of term data arrays for terms used to generate the tag cloud.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/category-template.php
Related Hooks

Related hooks will be displayed here in future updates.