wp_unique_post_slug_is_bad_flat_slug

wp_unique_post_slug_is_bad_flat_slug

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('wp_unique_post_slug_is_bad_flat_slug') is found 1 times:

  • /wp-includes/post.php line 5469
    5465
    5466
    5467
    5468
    5469
    5470
    5471
    5472
    5473
    5474
    5475
    * @param bool   $bad_slug  Whether the post slug would be bad as a flat slug.
     * @param string $slug      The post slug.
     * @param string $post_type Post type.
     */
    $is_bad_flat_slug = apply_filters( 'wp_unique_post_slug_is_bad_flat_slug', false, $slug, $post_type );
     
    if ( $post_name_check
        || in_array( $slug, $feeds, true ) || 'embed' === $slug
        || $conflicts_with_date_archive
        || $is_bad_flat_slug
    ) {