A WordPress-centric search engine for devs and theme authors



pre_wp_unique_post_slug ›

Since5.1.0
Deprecatedn/a
apply_filters( 'pre_wp_unique_post_slug', null, $slug, $post_ID, $post_status, $post_type, $post_parent )
Parameters: (6)
  • (string) $override_slug Short-circuit return value.
    Required: Yes
  • (string) $slug The desired slug (post_name).
    Required: Yes
  • (int) $post_ID Post ID.
    Required: Yes
  • (string) $post_status The post status.
    Required: Yes
  • (string) $post_type Post type.
    Required: Yes
  • (int) $post_parent Post parent ID.
    Required: Yes
Defined at:
Codex:

Filters the post slug before it is generated to be unique.

Returning a non-null value will short-circuit the unique slug generation, returning the passed value instead.





Source

$override_slug = apply_filters( 'pre_wp_unique_post_slug', null, $slug, $post_ID, $post_status, $post_type, $post_parent );