WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/sync category tag slugs

Contents

Description

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

Usage

<?php sync_category_tag_slugs$term$taxonomy ); ?>

Parameters

$term
(object|array) (required) The term.
Default: None
$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.
Default: None

Returns Values

(object|array) 
Returns $term, after filtering the 'slug' field with sanitize_title() if $taxonomy is 'category' or 'post_tag'.

Examples

This function is not intended to be called directly, but is hooked to the 'get_term' filter by default.

Notes

Change Log

Source File

sync_category_tag_slugs() is located in wp-admin/includes/ms.php.

Related

See also index of Function Reference and index of Template Tags.
This article is marked as in need of editing. You can help Codex by editing it.