[wp-trac] [WordPress Trac] #11863: Trashed items interfere with page/post slug generation
WordPress Trac
noreply at wordpress.org
Mon Feb 8 05:22:23 UTC 2016
#11863: Trashed items interfere with page/post slug generation
------------------------------------------------+------------------------
Reporter: Denis-de-Bernardy | Owner: ericlewis
Type: enhancement | Status: assigned
Priority: normal | Milestone: 4.5
Component: Posts, Post Types | Version: 2.9
Severity: normal | Resolution:
Keywords: make-flow has-patch has-unit-tests | Focuses:
------------------------------------------------+------------------------
Changes (by ericlewis):
* keywords: make-flow needs-patch => make-flow has-patch has-unit-tests
Comment:
In attachment:11863.4.diff:
* Create a new function `_add_suffix_to_post_name_for_trashed_posts()`
that will add a suffix to the trashed posts' slugs that match a given
slug, while noting their "desired" slug in post meta.
* Invoke `_add_suffix_to_post_name_for_trashed_posts()` when a post is
modified/created via `wp_insert_post()` as well as in
`get_sample_permalink()` because that's where slug uniqueness is
calculated after the user enters a title on Edit Post.
* When a post is untrashed, reassign its "desired" slug.
* Unit tests.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/11863#comment:102>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list