wp_unique_post_slug_is_bad_hierarchical_slug WordPress Filter Hook

The wp_unique_post_slug_is_bad_hierarchical_slug hook is used to check if a post slug is bad for a hierarchical post type. This hook is used by the WordPress core to make sure that post slugs are not duplicated.

apply_filters( 'wp_unique_post_slug_is_bad_hierarchical_slug', bool $bad_slug, string $slug, string $post_type, int $post_parent ) #

Filters whether the post slug would make a bad hierarchical post slug.


Parameters

$bad_slug

(bool)Whether the post slug would be bad in a hierarchical post context.

$slug

(string)The post slug.

$post_type

(string)Post type.

$post_parent

(int)Post parent ID.


Top ↑

Source

File: wp-includes/post.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More