[wp-trac] [WordPress Trac] #34043: wp_check_for_changed_slugs() ignores attachments
WordPress Trac
noreply at wordpress.org
Sun Sep 27 11:22:49 UTC 2015
#34043: wp_check_for_changed_slugs() ignores attachments
-------------------------------+------------------------------------------
Reporter: swissspidy | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: 2.1
Severity: normal | Keywords: needs-patch needs-unit-tests
Focuses: |
-------------------------------+------------------------------------------
While working on #33920 I noticed that `wp_check_for_changed_slugs()` only
works for published, non-hierarchical posts.
However, I think it should also store the changed slug for attachments
(post status `'inherit'`). Currently, when you change the slug of an
attachment and visit its old URL, you get a 404 error.
When implementing this we could enhance the unit tests #33920 introduces
and also add tests for the `wp_check_for_changed_slugs` function itself
beforehand.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34043>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list