[wp-trac] [WordPress Trac] #20905: Allow rewrite endpoints to specify a different query variable name

WordPress Trac wp-trac at lists.automattic.com
Mon Jun 11 13:53:41 UTC 2012


#20905: Allow rewrite endpoints to specify a different query variable name
-------------------------+-----------------------------
 Reporter:  johnbillion  |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Permalinks   |    Version:
 Severity:  normal       |   Keywords:
-------------------------+-----------------------------
 Using `add_rewrite_endpoint()` we can add an endpoint such as `/foo/bar/`
 which maps to `foo=bar`. I'd like to be able to map an endpoint to a query
 variable of a different name. Currently the query variable name always
 matches the endpoint name.

 Example: I'd like to use `/p/{number}` as a nice short endpoint for some
 custom functionality, but the 'p' query variable is used by core. I'd like
 to be able to map `/p/3/` to `my_query_var=3`.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20905>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list