[wp-trac] [WordPress Trac] #37996: Unnecessary rewrite rules added for the /embed endpoint
WordPress Trac
noreply at wordpress.org
Thu Sep 8 17:18:54 UTC 2016
#37996: Unnecessary rewrite rules added for the /embed endpoint
--------------------------+----------------------------
Reporter: johnbillion | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Embeds | Version: 4.4
Severity: minor | Keywords: needs-patch
Focuses: |
--------------------------+----------------------------
WordPress appends `/embed` to a bunch of rewrite rules that it shouldn't.
By default, the following rewrite rules are present on every site but are
not valid:
* `category/(.+?)/embed/?$`
* `tag/([^/]+)/embed/?$`
* `type/([^/]+)/embed/?$`
* `comments/embed/?$`
* `search/(.+)/embed/?$`
* `author/([^/]+)/embed/?$`
* `([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/embed/?$`
* `([0-9]{4})/([0-9]{1,2})/embed/?$`
* `([0-9]{4})/embed/?$`
* `[0-9]{4}/[0-9]{1,2}/[^/]+/([^/]+)/embed/?$`
These are generated in `WP_Rewrite::generate_rewrite_rules()`.
Related: #35067
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37996>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list