wp_unique_post_slug_is_bad_attachment_slug

wp_unique_post_slug_is_bad_attachment_slug

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.1

apply_filters('wp_unique_post_slug_is_bad_attachment_slug') is found 1 times:

  • /wp-includes/post.php line 5377
    		 *
    		 * @param bool   $bad_slug Whether the slug would be bad as an attachment slug.
    		 * @param string $slug     The post slug.
    		 */
    		$is_bad_attachment_slug = apply_filters( 'wp_unique_post_slug_is_bad_attachment_slug', false, $slug );
    
    		if ( $post_name_check
    			|| in_array( $slug, $feeds, true ) || 'embed' === $slug
    			|| $is_bad_attachment_slug
    		) {
    			$suffix = 2;