apply_filters( 'pre_wp_unique_post_slug', string|null $override_slug , string $slug , int $post_id , string $post_status , string $post_type , int $post_parent )
Filters the post slug before it is generated to be unique.
Description
Returning a non-null value will short-circuit the unique slug generation, returning the passed value instead.
Parameters
- $override_slug
-
Short-circuit return value.
- $slug
-
The desired slug (post_name).
- $post_id
-
Post ID.
- $post_status
-
The post status.
- $post_type
-
Post type.
- $post_parent
-
Post parent ID.
Source
File: wp-includes/post.php
Changelog
Version | Description |
---|---|
5.1.0 | Introduced. |