wp_unique_term_slug filter-hookWP 4.3.0

Filters the unique term slug.

Usage

add_filter( 'wp_unique_term_slug', 'wp_kama_unique_term_slug_filter', 10, 3 );

/**
 * Function for `wp_unique_term_slug` filter-hook.
 * 
 * @param string $slug          Unique term slug.
 * @param object $term          Term object.
 * @param string $original_slug Slug originally passed to the function for testing.
 *
 * @return string
 */
function wp_kama_unique_term_slug_filter( $slug, $term, $original_slug ){

	// filter...
	return $slug;
}
$slug(string)
Unique term slug.
$term(object)
Term object.
$original_slug(string)
Slug originally passed to the function for testing.

Changelog

Since 4.3.0 Introduced.

Where the hook is called

wp_unique_term_slug()
wp_unique_term_slug
wp-includes/taxonomy.php 3085
return apply_filters( 'wp_unique_term_slug', $slug, $term, $original_slug );

Where the hook is used in WordPress

Usage not found.