WordPress at a glance
function is not described

sync_category_tag_slugs() WP 3.0.0

Synchronizes category and post tag slugs when global terms are enabled.

No Hooks.


WP_Term/Array. Returns $term, after filtering the 'slug' field with sanitize_title() if $taxonomy is 'category' or 'post_tag'.


sync_category_tag_slugs( $term, $taxonomy );
$term(WP_Term/array) (required)
The term.
$taxonomy(string) (required)
The taxonomy for $term. Should be 'category' or 'post_tag', as these are the only taxonomies which are processed by this function; anything else will be returned untouched.

Code of sync category tag slugs: wp-admin/includes/ms.php WP 5.2.1

function sync_category_tag_slugs( $term, $taxonomy ) {
	if ( global_terms_enabled() && ( $taxonomy == 'category' || $taxonomy == 'post_tag' ) ) {
		if ( is_object( $term ) ) {
			$term->slug = sanitize_title( $term->name );
		} else {
			$term['slug'] = sanitize_title( $term['name'] );
	return $term;