$add_trashed_suffix =
apply_filters( 'add_trashed_suffix_to_trashed_posts', true,
$post_name,
$post_id );
if ( $add_trashed_suffix ) { wp_add_trashed_suffix_to_post_name_for_trashed_posts( $post_name,
$post_id );
} } // When trashing an existing post, change its slug to allow non-trashed posts to use it.
if ( 'trash' ===
$post_status && 'trash' !==
$previous_status && 'new' !==
$previous_status ) { $post_name =
wp_add_trashed_suffix_to_post_name_for_post( $post_id );
} $post_name =
wp_unique_post_slug( $post_name,
$post_id,
$post_status,
$post_type,
$post_parent );
// Don't unslash.