wp_unique_post_slug ( $slug, $post_ID, $post_status, $post_type, $post_parent )
- (string) $slug The desired slug (post_name).
- (int) $post_ID Post ID.
- (string) $post_status No uniqueness checks are made if the post is still draft or pending.
- (string) $post_type Post type.
- (int) $post_parent Post parent ID.
- (string) Unique slug for the post, based on $post_name (with a -1, -2, etc. suffix)
- Introduced in WordPress: 2.8.0
- Deprecated in WordPress: —
Computes a unique slug for the post, when given the desired slug and some post details.