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.
$override_slugstring|null
$slugstring
$post_idint
$post_statusstring
$post_typestring
$post_parentint
$override_slug = apply_filters( 'pre_wp_unique_post_slug', null, $slug, $post_id, $post_status, $post_type, $post_parent );
| Version | Description |
|---|---|
| 5.1.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/pre_wp_unique_post_slug