Logarithmic scale for tag cloud tag size
|Reported by:||kometbomb||Owned by:|
The tag clouds generated by wp_tag_cloud() tend to work poorly if there's one or two dominant tags, i.e. the tag could has very many small tags and one or two huge tags. This can be avoided by not resizing the tags by the normalized absolute post count but by the normalized log10 of the count. This makes the offending "peak" tags smaller.
Here's a patch that adds a new boolean arg for wp_tag_cloud() called 'logarithmic'. The default is false which makes wp_tag_cloud() generate the same cloud as before, setting the arg to true makes wp_tag_cloud() generate a tag cloud with the tag sizes based on log10.
Change History (8)
- Keywords has-patch added; tag cloud tags removed
- Milestone changed from Unassigned to 2.9