Make WordPress Core

Opened 10 years ago

Last modified 3 weeks ago

#30705 new enhancement

Add parameter to get_the_term_list() to allow templating

Reported by: davidjlaietta's profile davidjlaietta Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.5
Component: Taxonomy Keywords: needs-testing has-patch has-unit-tests
Focuses: Cc:

Description (last modified by SergeyBiryukov)

Similar to #27238 the parameter $term_template is suggested to allow for user created formatting for get_the_term_list(), as opposed to the previous standard of simply linking to each list in the term.

The reasoning for the change is that general linking is not always the desired action for displaying term lists. The method for inclusion is similar to [30209].

Attachments (1)

category-template.diff (1.2 KB) - added by davidjlaietta 10 years ago.
inclusion of $term_template argument

Download all attachments as: .zip

Change History (8)

@davidjlaietta
10 years ago

inclusion of $term_template argument

#1 @SergeyBiryukov
10 years ago

  • Description modified (diff)

#2 @johnbillion
10 years ago

  • Version changed from trunk to 2.5

#3 @johnbillion
10 years ago

  • Keywords has-patch needs-testing added

#4 @boonebgorges
10 years ago

  • Keywords needs-unit-tests needs-patch added; has-patch removed
  • Milestone changed from Awaiting Review to Future Release

Would like to see unit tests for this. Also, if we're going to add support here, we should also add it to functions that call get_the_term_list() - namely, get_the_tag_list().

#5 @wildworks
3 weeks ago

A proposal was made to display categories and tags without links in the Gutenberg Post Terms block.

The Post Terms block uses get_the_term_list() function internally, so I think this is related to this ticket.

https://github.com/WordPress/gutenberg/issues/69250

This ticket was mentioned in PR #8393 on WordPress/wordpress-develop by @sukhendu2002.


3 weeks ago
#6

  • Keywords has-patch has-unit-tests added; needs-unit-tests needs-patch removed

#7 @poena
3 weeks ago

There already are multiple functions for displaying the terms without links, please document what the benefit of this change would be.

Note: See TracTickets for help on using tickets.