Files
WordPress/wp-includes
Eric Lewis 04da8bb63a Posts: Non-trashed posts should take slug priority over trashed posts.
When determining a unique post slug, trashed posts are taken into account. Previously, new posts would add suffixes to their slugs (e.g. `about-2`) when a post in the trash had the desired slug (e.g. `about`). 

To avoid this behavior, when a post is trashed its slug (i.e. `post_name`) is now suffixed with `-%trashed%`. The post's pre-trash slug is stored as post meta, and if the post is restored from trash, its desired slug is reapplied. 

For existing trashed posts which don't have the `-%trashed%` suffix, the suffix is added when a post with its desired slug is created.

Props ocean90, boonebgorges, ryan, SergeyBiryukov, coffee2code, helen, williamsba1.
See #11863.

Built from https://develop.svn.wordpress.org/trunk@36607


git-svn-id: http://core.svn.wordpress.org/trunk@36574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-21 21:45:28 +00:00
..
2015-07-23 10:03:24 +00:00
2015-06-28 00:17:25 +00:00
2016-02-20 22:14:27 +00:00
2015-06-28 15:27:24 +00:00
2016-02-06 00:51:27 +00:00
2015-09-26 07:04:28 +00:00
2015-12-06 21:50:25 +00:00
2016-02-02 12:55:29 +00:00
2015-06-16 20:01:25 +00:00