wp_unique_post_slug


wp_unique_post_slug ( $slug, $post_ID, $post_status, $post_type, $post_parent )

Parameters:
  • (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.
Returns:
  • (string) Unique slug for the post, based on $post_name (with a -1, -2, etc. suffix)
Defined at:

Description

Computes a unique slug for the post, when given the desired slug and some post details.

Related Functions

wp_unique_term_slug, _truncate_post_slug, wp_count_posts, wp_get_post_cats, wp_filter_post_kses

Top Google Results

User discussions

wpseek mobile