Created
June 14, 2021 17:13
-
-
Save saltnpixels/069745b33693801f8c07f1b86a369e9e to your computer and use it in GitHub Desktop.
wp remove Tag cloud sizes
This file contains 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 characters
if ( ! function_exists( 'set_tag_cloud_sizes' ) ) { | |
/** | |
* Removes the inline font sizing. | |
* | |
* @param string $tags holds markup of tags | |
* | |
* @return string | |
*/ | |
function set_tag_cloud_sizes( string $tags ): string { | |
return preg_replace( '/style="font-size: \d+pt;"/', '', $tags ); | |
} | |
} | |
add_filter( 'wp_generate_tag_cloud', $n( 'set_tag_cloud_sizes' ), 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment