[wp-trac] Re: [WordPress Trac] #4552: number argument in
wp_tag_cloud is ignored
WordPress Trac
wp-trac at lists.automattic.com
Thu Sep 13 16:29:29 GMT 2007
#4552: number argument in wp_tag_cloud is ignored
-----------------------------------------------------+----------------------
Reporter: pgdx | Owner: ryan
Type: defect | Status: reopened
Priority: normal | Milestone: 2.4
Component: Template | Version: 2.3
Severity: normal | Resolution:
Keywords: tag cloud number wp_tag_cloud has-patch |
-----------------------------------------------------+----------------------
Changes (by Otto42):
* status: closed => reopened
* resolution: worksforme =>
* milestone: => 2.4
Comment:
This bug is easily reproducible, just badly described.
wp_generate_tag_cloud() does not use the number argument even though it's
in the defaults for the function. Call wp_generate_tag_cloud($tags,
"number=1") and you get back more than one tag.
Whether this should be fixed or not is up for debate. As I see it, you
should limit the number of tags when you call get_tags(), before passing
them to the generator function. This is what wp_tag_cloud() does.
So my suggested fix is simply to remove "number" as an option from the
defaults in wp_generate_tag_cloud(). It doesn't use $number anywhere and
it seems pointless to do so, if you want less tags, pass in a smaller
number of tags to begin with.
--
Ticket URL: <http://trac.wordpress.org/ticket/4552#comment:12>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list