wp_tag_cloud default unit output (undefined styling / solution)
|Reported by:||vlogtheimpaler||Owned by:|
I found a possibly unwanted behavior when attempting to dump the inline styles for wp_tag_cloud in one of my current "themes-in-progress". Mainly when the size arguments were left undefined:
All the units in this example default to '0', which hides listed tags all together via the inline styles. It seems to apply to lesser-used tags the most as I don't have a sample DB with tons of tags yet to test against. But it could be used to solve a problem at the same time.
I believe that instead of creating a whole new template tag or plug-in, wouldn't it be more useful to just use this as a valid argument to exclude inline styles? This way if units or min/max sizes (or all three as above) are left undefined, wp_tag_cloud can display tags exactly like wp_list_categories for those who don't want inline styles. It may also work some ideas from ticket #5172 if strings could be passed to define class names instead of units.
so something like:
wp_tag_cloud('&unit=0&number=0&orderby=count&format=list'); /* 'unit=&' or 'unit=0& */
could simply exclude inline styles all together where as:
would define the unit type as classes. Then divide the counted number of classes appropriately to be treated as numbered units while pushing class names as numbers.
If there's a plug-in that already does all of this, I haven't found it. But it would be so much easier to have it as a built-in template tag to flexibly display all tags.