-
-
Save DaDlugosch/6b962d2b366149a6818300572f692d68 to your computer and use it in GitHub Desktop.
Revisions
-
dylanjameswagner created this gist
May 3, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ function carbon_tag_cloud_class_active($tags_data) { $body_class = get_body_class(); foreach ($tags_data as $key => $tag) { if(in_array('tag-'.$tag['id'], $body_class)) { $tags_data[$key]['class'] = $tags_data[$key]['class'] ." active-tag"; } } return $tags_data; } add_filter('wp_generate_tag_cloud_data', 'carbon_tag_cloud_class_active');