Make WordPress Core

Opened 3 years ago

Last modified 3 months ago

#16929 new defect (bug)

pass the $type_of_url context param on user_trailingslashit() for CPT's

Reported by: dd32 Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 3.1
Component: Permalinks Keywords: needs-patch
Focuses: Cc:


Currently get_post_permalink() does not pass the context flag to user_trailingslashit(), this means that for custom post types, it's not possible to target them through the 'user_trailingslashit' filter.

It might be worth checking to see if taxonomies and any other uses of user_trailingslashit() pass the context as well.

Change History (2)

comment:1 dd323 years ago

redirect_canonical() also passes url's through this filter, In the case of *all* single pages(including that of CPT's), the context is set to 'single'.

comment:2 nacin3 months ago

  • Component changed from Template to Permalinks
Note: See TracTickets for help on using tickets.