[wp-trac] [WordPress Trac] #36812: WP_Rewrite removes regex groups, should replace with non-capturing

WordPress Trac noreply at wordpress.org
Mon Jun 6 23:07:27 UTC 2016


#36812: WP_Rewrite removes regex groups, should replace with non-capturing
---------------------------+------------------------------
 Reporter:  cvedovini      |       Owner:
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Rewrite Rules  |     Version:  4.5.2
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:
---------------------------+------------------------------

Comment (by JProffitt71):

 +1 I just ran into this exact same issue. It is preventing me from
 properly creating a structure for a rebuild of a site that used month
 names instead of month numbers in their post permalinks.

 I worked around it by defining my own tokens for `(` and `)`, and then
 replaced those in "post_rewrite_rules"

 The only way I could work around it right now is to define my own
 placeholders for '(' and ')' and replace those in a `post_rewrite_rules`
 filter. (Note: I couldn't use non-capturing groups because those throw off
 the queryvar matching, it puts the next tag in my non-capturing tags query
 var).

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36812#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list