wordpress / latest / hooks / wp_unique_post_slug_is_bad_attachment_slug.html

apply_filters( 'wp_unique_post_slug_is_bad_attachment_slug', bool $bad_slug, string $slug )

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

Parameters

$bad_slug bool
Whether the slug would be bad as an attachment slug.
$slug string
The post slug.

Source

File: wp-includes/post.php. View all references

$is_bad_attachment_slug = apply_filters( 'wp_unique_post_slug_is_bad_attachment_slug', false, $slug );

Used By

Used By Description

Changelog

Version Description
3.1.0 Introduced.

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