A WordPress-centric search engine for devs and theme authors



wp_unique_post_slug_is_bad_attachment_slug ›

Since3.1.0
Deprecatedn/a
apply_filters( 'wp_unique_post_slug_is_bad_attachment_slug', false, $slug )
Parameters: (2)
  • (bool) $bad_slug Whether the slug would be bad as an attachment slug.
    Required: Yes
  • (string) $slug The post slug.
    Required: Yes
Defined at:
Codex:

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





Source

if ( $post_name_check || in_array( $slug, $feeds ) || 'embed' === $slug || apply_filters( 'wp_unique_post_slug_is_bad_attachment_slug', false, $slug ) ) {