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

WordPress Trac noreply at wordpress.org
Fri Sep 18 07:12:32 UTC 2015


#33920: `wp_old_slug_redirect` ignores rewrite endpoints
--------------------------+-----------------------------
 Reporter:  swissspidy    |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Query         |    Version:  2.1
 Severity:  normal        |   Keywords:  needs-patch
  Focuses:                |
--------------------------+-----------------------------
 For the [https://wordpress.org/plugins/oembed-api/ oEmbed feature plugin]
 we're adding an `embed` rewrite endpoint to posts, to have URLs like
 `http://example.com/my-post/embed/`

 However, when the slug changes from `my-post` to `new-post`,
 `wp_old_slug_redirect` redirects to `http://example.com/new-post/`,
 ignoring the endpoint.

 The function should check for such query vars / endpoints in the process.

 Additionally, a filter for the resulting URL in this function would be
 helpful for developers.

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


More information about the wp-trac mailing list