W3cubDocs

/WordPress

apply_filters( ‘wp_unique_post_slug_is_bad_flat_slug’, bool $bad_slug, string $slug, string $post_type )

Filters whether the post slug would be bad as a flat slug.

Parameters

$bad_slugbool
Whether the post slug would be bad as a flat slug.
$slugstring
The post slug.
$post_typestring
Post type.

Source

$is_bad_flat_slug = apply_filters( 'wp_unique_post_slug_is_bad_flat_slug', false, $slug, $post_type );

Changelog

Version Description
3.1.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_unique_post_slug_is_bad_flat_slug