wpseek.com
A WordPress-centric search engine for devs and theme authors
sync_category_tag_slugs › WordPress Function
Since3.0.0
Deprecatedn/a
› sync_category_tag_slugs ( $term, $taxonomy )
Parameters: (2) |
|
Returns: |
|
Defined at: |
|
Codex: |
Synchronizes category and post tag slugs when global terms are enabled.
Related Functions: get_category_by_slug, the_category_rss, is_category, in_category, category_exists
Source
function sync_category_tag_slugs( $term, $taxonomy ) { if ( global_terms_enabled() && ( 'category' === $taxonomy || 'post_tag' === $taxonomy ) ) { if ( is_object( $term ) ) { $term->slug = sanitize_title( $term->name ); } else { $term['slug'] = sanitize_title( $term['name'] ); } } return $term; }