wp_unique_term_slug WordPress Filter Hook

The wp_unique_term_slug hook is used to enforce a unique slug for a term. This is useful for preventing duplicate slugs from being created for terms in the same taxonomy.

apply_filters( 'wp_unique_term_slug', string $slug, object $term, string $original_slug ) #

Filters the unique term slug.


Parameters

$slug

(string)Unique term slug.

$term

(object)Term object.

$original_slug

(string)Slug originally passed to the function for testing.


Top ↑

Source

File: wp-includes/taxonomy.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More