[wp-trac] [WordPress Trac] #33920: `wp_old_slug_redirect` ignores rewrite endpoints

WordPress Trac noreply at wordpress.org
Thu Sep 24 04:36:31 UTC 2015


#33920: `wp_old_slug_redirect` ignores rewrite endpoints
----------------------------------------+------------------
 Reporter:  swissspidy                  |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  4.4
Component:  Query                       |     Version:  2.1
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+------------------
Changes (by pento):

 * keywords:  has-patch => has-patch needs-unit-tests


Comment:

 I like it.

 While it's kind of hacky, we could add unit tests using the new
 `old_slug_redirect_url` filter - hook into the filter, verify that the URL
 is correct, then return `false` to short circuit before the
 `wp_redirect()`.

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


More information about the wp-trac mailing list