wp_unique_post_slug_is_bad_attachment_slug WordPress Filter Hook

This hook is called when Wordpress is about to generate a unique post slug for an attachment, and it allows you to override the generated slug.

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.


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
Show More