Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now
2 corrected spelling
source | link

maybe a better/more simple approch is hooking in "wp_generate_tag_cloud_data" ;)

function tribalpixel_tag_cloud_class($tags_data) {

    foreach ($tags_data as $key => $tag) {
        $tags_data[$key]['class'] =  $tags_data[$key]['class'] ." myCustomClass";
    }
    return $tags_data;
}

add_filter('wp_generate_tag_cloud_data', ' tribalpixel_tag_cloud_class');

in $tag you have [id], [url], [name], [title], [slug], [real_count], [class], [font_size]

So if you want a custom class for every tag you can use something like:

$tags_data[$key]['class'] = "tag-link-".$tag['slug'];

maybe a better/more simple approch is hooking in "wp_generate_tag_cloud_data" ;)

function tribalpixel_tag_cloud_class($tags_data) {

    foreach ($tags_data as $key => $tag) {
        $tags_data[$key]['class'] =  $tags_data[$key]['class'] ." myCustomClass";
    }
    return $tags_data;
}

add_filter('wp_generate_tag_cloud_data', ' tribalpixel_tag_cloud_class');

maybe a better/more simple approch is hooking in "wp_generate_tag_cloud_data" ;)

function tribalpixel_tag_cloud_class($tags_data) {

    foreach ($tags_data as $key => $tag) {
        $tags_data[$key]['class'] =  $tags_data[$key]['class'] ." myCustomClass";
    }
    return $tags_data;
}

add_filter('wp_generate_tag_cloud_data', ' tribalpixel_tag_cloud_class');

in $tag you have [id], [url], [name], [title], [slug], [real_count], [class], [font_size]

So if you want a custom class for every tag you can use something like:

$tags_data[$key]['class'] = "tag-link-".$tag['slug'];
1
source | link

maybe a better/more simple approch is hooking in "wp_generate_tag_cloud_data" ;)

function tribalpixel_tag_cloud_class($tags_data) {

    foreach ($tags_data as $key => $tag) {
        $tags_data[$key]['class'] =  $tags_data[$key]['class'] ." myCustomClass";
    }
    return $tags_data;
}

add_filter('wp_generate_tag_cloud_data', ' tribalpixel_tag_cloud_class');