[wp-trac] [WordPress Trac] #14156: Option to use name, in additon to slug and id in get_term_link() function
WordPress Trac
wp-trac at lists.automattic.com
Wed Jun 30 23:37:17 UTC 2010
#14156: Option to use name, in additon to slug and id in get_term_link() function
-------------------------+--------------------------------------------------
Reporter: sudar | Owner:
Type: enhancement | Status: new
Priority: low | Milestone: 3.1
Component: Taxonomy | Version: 3.0
Severity: normal | Keywords: taxonomy, get_term_link, has-patch
-------------------------+--------------------------------------------------
Comment(by scribu):
On the other hand, while I agree that:
`get_term_link( 'Term Name', 'taxname', 'name' )`
looks better than:
`get_term_link( get_term_by( 'name', 'Term Name', 'taxname' ), 'taxname'
)`
, it's just an implementation detail. get_term_link() shouldn't be
concerned with retrieving the correct term.
To avoid passing the taxonomy over and over again, it would be nice if you
could do something like this instead:
`get_term_by( 'name', 'Term Name', 'taxname' )->get_link()`
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14156#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list