Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#11449 closed feature request (fixed)

register_taxonomy should have flexibility when using with_front option in permalink structure

Reported by: prettyboymp Owned by: filosofo
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.9
Component: Taxonomy Keywords: has-patch tested dev-feedback
Focuses: Cc:


By default, the register_taxonomy function adds the permastruct without passing in a 'with_front' parameter. This defaults it as true which adds the posts permastructure front at the beginning of the taxonomy permastructure even if the taxonomy isn't related to posts. The register_taxonomy should accept args to turn this off.

Attachments (2)

11449.patch (826 bytes) - added by prettyboymp 11 years ago.
11449-2.patch (828 bytes) - added by prettyboymp 11 years ago.
updated patch

Download all attachments as: .zip

Change History (9)

11 years ago

#1 @hakre
11 years ago

Nice find.

#2 @hakre
11 years ago

  • Keywords tested added

#3 @hakre
11 years ago

  • Keywords dev-feedback added

Some devs should consider to commit this patch or to just drop it and close the ticket.

#4 @ryan
11 years ago

Example links before and after the patch? Example post permastruct?

#5 @ryan
11 years ago

Looks good to me, I just want to document the expectations so we can get some test cases going.

#6 @prettyboymp
11 years ago

Example post permastruct: /blog/%year%/%monthnum%/%postname%/

Example link before patch for a taxonomy with the following rewrite array('slug' => 'people', 'with_front' => false) : /blog/people/%term-slug%/

Example link after patch for a taxonomy with the following rewrite array('slug' => 'people', 'with_front' => false) : /people/%term-slug%/

11 years ago

updated patch

#7 @ryan
11 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [12791]) Add flag to taxonomy registration allowing permalinks to be prepended with front, or not. Props prettyboymp. fixes #11449

Note: See TracTickets for help on using tickets.