wp_unique_post_slug_is_bad_hierarchical_slug

wp_unique_post_slug_is_bad_hierarchical_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_hierarchical_slug') is found 1 times:

  • /wp-includes/post.php line 5413
    5409
    5410
    5411
    5412
    5413
    5414
    5415
    5416
    5417
    5418
    5419
    * @param string $slug        The post slug.
     * @param string $post_type   Post type.
     * @param int    $post_parent Post parent ID.
     */
    $is_bad_hierarchical_slug = apply_filters( 'wp_unique_post_slug_is_bad_hierarchical_slug', false, $slug, $post_type, $post_parent );
     
    if ( $post_name_check
        || in_array( $slug, $feeds, true ) || 'embed' === $slug
        || preg_match( "@^($wp_rewrite->pagination_base)?\d+$@", $slug )
        || $is_bad_hierarchical_slug
    ) {