[wp-trac] [WordPress Trac] #4328: Redirect Old Slugs feature needs to redirect slugs for pages, not just posts, and redirect old permalink structure
WordPress Trac
noreply at wordpress.org
Sat Mar 17 04:25:14 UTC 2018
#4328: Redirect Old Slugs feature needs to redirect slugs for pages, not just
posts, and redirect old permalink structure
------------------------------------------+--------------------------
Reporter: Denis-de-Bernardy | Owner: markjaquith
Type: enhancement | Status: new
Priority: normal | Milestone: 5.0
Component: Canonical | Version: 2.2
Severity: normal | Resolution:
Keywords: needs-unit-tests needs-patch | Focuses:
------------------------------------------+--------------------------
Changes (by dd32):
* keywords: has-patch needs-refresh needs-unit-tests => needs-unit-tests
needs-patch
Comment:
Replying to [comment:31 dd32]:
> [attachment:4328.patch] seems like it's really the only thing needed
here (I've not looked into it)
I've been thinking about this, with an intent of trying some code out,
however I think i should also note here this thought:
- For hierarchical post types, the `_wp_old_slug` value should be the
full hierarchical path, for example, given `/foo/bar/` and `/bar/` being
moved to `/subpage/foo/bar/` and `/subpage/bar/` respectively, I'd expect
`/foo/bar/` and `/bar/` to redirect to the correct locations.
The current patch doesn't do that, as it'd only store `bar` for both of
these pages (Well, it wouldn't actually, as it only compares on slugs, but
ignoring that..)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/4328#comment:33>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list