wp_unique_term_slug_is_bad_slug filter-hook . WP 4.3.0
Filters whether the proposed unique term slug is bad.
Usage
add_filter( 'wp_unique_term_slug_is_bad_slug', 'filter_function_name_792', 10, 3 ); function filter_function_name_792( $needs_suffix, $slug, $term ){ // filter... return $needs_suffix; }
- $needs_suffix(true/false)
- Whether the slug needs to be made unique with a suffix.
- $slug(string)
- The slug.
- $term(object)
- Term object.
Changelog
Since 4.3.0 | Introduced. |
Where the hook is called
wp_unique_term_slug_is_bad_slug
wp-includes/taxonomy.php 2886
if ( apply_filters( 'wp_unique_term_slug_is_bad_slug', $needs_suffix, $slug, $term ) ) {