wp_unique_term_slug_is_bad_slug

wp_unique_term_slug_is_bad_slug

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

See hook in core

Displaying hooks found in version: wordpress-6.7

apply_filters('wp_unique_term_slug_is_bad_slug') is found 1 times:

  • /wp-includes/taxonomy.php line 3130
    	 * @param bool   $needs_suffix Whether the slug needs to be made unique with a suffix.
    	 * @param string $slug         The slug.
    	 * @param object $term         Term object.
    	 */
    	if ( apply_filters( 'wp_unique_term_slug_is_bad_slug', $needs_suffix, $slug, $term ) ) {
    		if ( $parent_suffix ) {
    			$slug .= $parent_suffix;
    		}
    
    		if ( ! empty( $term->term_id ) ) {
    			$query = $wpdb->prepare( "SELECT slug FROM $wpdb->terms WHERE slug = %s AND term_id != %d", $slug, $term->term_id );