wp_unique_post_slug_is_bad_flat_slug filter-hook . WP 3.1.0
Filters whether the post slug would be bad as a flat slug.
Usage
add_filter( 'wp_unique_post_slug_is_bad_flat_slug', 'filter_function_name_4252', 10, 3 ); function filter_function_name_4252( $bad_slug, $slug, $post_type ){ // filter... return $bad_slug; }
- $bad_slug(true/false)
- Whether the post slug would be bad as a flat slug.
- $slug(string)
- The post slug.
- $post_type(string)
- Post type.
Changelog
Since 3.1.0 | Introduced. |
Where the hook is called
wp_unique_post_slug_is_bad_flat_slug
wp-includes/post.php 4681
$is_bad_flat_slug = apply_filters( 'wp_unique_post_slug_is_bad_flat_slug', false, $slug, $post_type );