wp_tag_cloud counts terms attached to future posts when used with custom taxonomies
|Reported by:||fwiffo||Owned by:||filosofo|
If you create a custom taxonomy, then attach some terms from that taxonomy to a future scheduled post, attachments attached to a future post, or unattached attachments, they will get counted toward the totals used to draw the tag cloud produced by wp_tag_cloud.
As a result, the sizes of the items in the tag cloud will be wrong, and the tooltips will show the wrong count. In some cases, if a particular term is only attached to future posts, clicking on the link in the tag cloud will result in a 404 because the main $wp_query correctly filters out future posts and unattached attachments when looking at the term's archive.
Correct behavior would be for get_terms to provide an option to filter out future posts and unattached attachments from its results the same as is done when looking at the term's archive.