[wp-trac] [WordPress Trac] #34187: merge wp_list_categories with wp_dropdown_categories
WordPress Trac
noreply at wordpress.org
Wed Oct 7 13:21:55 UTC 2015
#34187: merge wp_list_categories with wp_dropdown_categories
-----------------------------+----------------------
Reporter: nguyenvanduocit | Owner:
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: General | Version:
Severity: normal | Resolution: invalid
Keywords: | Focuses:
-----------------------------+----------------------
Changes (by boonebgorges):
* status: new => closed
* resolution: => invalid
* milestone: Awaiting Review =>
Comment:
Hi nguyenvanduocit - Thanks for the ticket!
The two functions support many of the same parameters. But many of the
default values are different. So you'd have to do some argument overriding
when 'format=dropdown' that wouldn't happen when 'format=list'. The two
functions use different walkers - another thing that'd have to be handled
via parameter. And then they handle markup differently, since they
generate very different kinds of markup, so a combined function would have
lots of `if ( 'list' === $format )` types of blocks.
If there are specific problems that would be solved by merging the two
functions, please feel free to outline them. If this is just about
reducing duplication, I don't think much duplication will, in fact, be
avoided by merging. Let's not refactor for the sake of refactoring.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34187#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list