[wp-trac] [WordPress Trac] #27238: Add parameters to the_taxonomies() and get_the_taxonomies() to deselect linking

WordPress Trac noreply at wordpress.org
Fri Feb 28 16:14:08 UTC 2014


#27238: Add parameters to the_taxonomies() and get_the_taxonomies() to deselect
linking
---------------------------+-----------------------------
 Reporter:  davidjlaietta  |      Owner:
     Type:  enhancement    |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Taxonomy       |    Version:  trunk
 Severity:  normal         |   Keywords:
  Focuses:                 |
---------------------------+-----------------------------
 Currently get_the_taxonomies() automatically wrap all taxonomies that they
 list in anchor tags:

 $links[] = "<a href='" . esc_attr( get_term_link($term) ) .
 "'>$term->name</a>";

 We would like to have the option to remove these, to display an unlinked
 list of taxonomies that are applied to a post:

 $list[] = $term->name;

 The patch that I've attached includes a 'links' parameter to both
 the_taxonomies() and get_the_taxonomies(), set to true to not affect
 existing usage of these functions. If the parameter is set to false, only
 the taxonomies will be returned, and not their links.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27238>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list