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 Description

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

Parameters Parameters


(string|null) Short-circuit return value.


(string) The desired slug (post_name).


(int) Post ID.


(string) The post status.


(string) Post type.


(int) Post parent ID.

Top ↑

Source Source

File: wp-includes/post.php

View on Trac

Top ↑

Changelog Changelog

Version Description
5.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.