Make WordPress Core

Opened 14 years ago

Closed 8 years ago

#14449 closed enhancement (duplicate)

Create add_permastruct() filters for register_taxonomy() and register_post_type()

Reported by: wjm's profile wjm Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: Taxonomy Keywords: needs-refresh needs-docs
Focuses: Cc:

Description

When registering taxonomies { using register_taxonomy() }, it would be good to have a filter that controls the $struct argument for add_permastruct().

That way you can modify the rewrite rules without having to hack $wp_filters->rules

This patch creates the filter "register_taxonomy_permastruct"

Note: the same could be applied to register_post_type()

Attachments (1)

add_permastruct_filter.patch (692 bytes) - added by wjm 14 years ago.

Download all attachments as: .zip

Change History (6)

#1 @mikeschinkel
14 years ago

  • Cc mikeschinkel@… added

#2 @nacin
14 years ago

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

I imagine we would instead offer these as arguments for the rewrite flag. In the meantime, you can set rewrite to false and roll your own.

#3 @chriscct7
10 years ago

  • Keywords needs-refresh added; needs-patch removed

#4 @chriscct7
9 years ago

  • Keywords needs-docs added

#5 @johnbillion
8 years ago

  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #33990.

Note: See TracTickets for help on using tickets.