<?php function pmwi_sanitize_taxonomy_name($taxonomy){ $filtered = strtolower( remove_accents( stripslashes( strip_tags( $taxonomy ) ) ) ); $filtered = preg_replace( '/&.+?;/', '', $filtered ); // Kill entities $filtered = str_replace( array( '.', '\'', '"' ), '', $filtered ); // Kill quotes and full stops. $filtered = str_replace( array( ' ', '_' ), '-', $filtered ); // Replace spaces and underscores. return apply_filters( 'sanitize_taxonomy_name', $filtered, $taxonomy ); } ?>