[wp-trac] [WordPress Trac] #24656: Tag Cloud generation return object for manipulation

WordPress Trac noreply at wordpress.org
Sun Jun 28 17:12:51 UTC 2015

#24656: Tag Cloud generation return object for manipulation
 Reporter:  ysalame                              |       Owner:
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Future
Component:  Taxonomy                             |  Release
 Severity:  normal                               |     Version:  3.5
 Keywords:  needs-patch good-first-bug dev-      |  Resolution:
  feedback                                       |     Focuses:

Comment (by flixos90):

 In this patch I implemented your suggestions regarding using arrays for
 the tag data as well as splitting the foreach loop.

 > If we're going to pass structured data around, let's do it in arrays
 rather than objects. This is more in keeping with practice throughout WP.
 > I'm not sure I see the value in *returning* structured data from the
 function. The purpose of the function is to generate markup; changing it
 to return structured data in an arbitrary format suggests the need for
 another function. That being said, I don't think another function is
 really necessary. How about this: Break the `foreach ( $tags as $key =>
 $tag )` loop into two loops.

Ticket URL: <https://core.trac.wordpress.org/ticket/24656#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list