sanitize_taxonomy_name
Sanitize taxonomy names. Slug format (no spaces, lowercase). Urldecode is used to reverse munging of UTF8 characters.
Использование
add_filter( 'sanitize_taxonomy_name', 'wp_kama_sanitize_taxonomy_name_filter' ); /** * Function for `sanitize_taxonomy_name` filter-hook. * * @param $taxonomy * * @return */ function wp_kama_sanitize_taxonomy_name_filter( $taxonomy ){ // filter... return $taxonomy; }
- $taxonomy
- -
Где вызывается хук
sanitize_taxonomy_name
woocommerce/includes/wc-formatting-functions.php 65
return apply_filters( 'sanitize_taxonomy_name', urldecode( sanitize_title( urldecode( $taxonomy ?? '' ) ) ), $taxonomy );