WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Купить персональные IPV4 и IPV6 прокси
функция не описана

sync_category_tag_slugs() WP 3.0.0

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

Хуков нет.

Возвращает

WP_Term/Массив. 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/массив) (обязательный)
The term.
$taxonomy(строка) (обязательный)
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.

Список изменений

С версии 3.0.0 Введена.

Код sync category tag slugs: wp-admin/includes/ms.php WP 5.2.2

<?php
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;
}