WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 4 years ago

#14449 closed enhancement (duplicate)

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

Reported by: 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 10 years ago.

Download all attachments as: .zip

Change History (6)

#1 @mikeschinkel
10 years ago

  • Cc mikeschinkel@… added

#2 @nacin
10 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
6 years ago

  • Keywords needs-refresh added; needs-patch removed

#4 @chriscct7
5 years ago

  • Keywords needs-docs added

#5 @johnbillion
4 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.