Opened 8 years ago
Closed 8 years ago
#39601 closed enhancement (fixed)
In get_term_link() : we should be able to filter the term link structure before token replacement occurs
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.9 | Priority: | normal |
Severity: | normal | Version: | 4.7.1 |
Component: | Taxonomy | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
Hi!
We can currently filter the permalink post structure in get_permalink()
with pre_post_link
. ( https://core.trac.wordpress.org/browser/tags/4.7/src/wp-includes/link-template.php#L118 )
It woud be useful to have the same possiblity with term links in get_term_link()
( https://core.trac.wordpress.org/browser/tags/4.7/src/wp-includes/taxonomy.php#L3834 ), with a filter. For example with a pre_term_link
filter.
That would allow developers to easily disable fancy links for terms in a given context, which is possible right now for posts but not easy to achieve with terms.
Hope this makes sense, thanks !
Attachments (3)
Change History (14)
#1
@
8 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to Future Release
#3
@
8 years ago
- Keywords has-patch added; needs-patch removed
- Milestone changed from Future Release to 4.8
#4
@
8 years ago
- Keywords needs-testing added
This needs review and an owner if its going to land in 4.8.
@SergeyBiryukov
pre_term_link
is available for the filter name