W3cubDocs

/WordPress

apply_filters( ‘editable_slug’, string $slug, WP_Term|WP_Post $tag )

Filters the editable slug for a post or term.

Description

Note: This is a multi-use hook in that it is leveraged both for editable post URIs and term slugs.

Parameters

$slugstring
The editable slug. Will be either a term slug or post URI depending upon the context in which it is evaluated.
$tagWP_Term|WP_Post
Term or post object.

Source

$slug = isset( $tag->slug ) ? apply_filters( 'editable_slug', $tag->slug, $tag ) : '';

Changelog

Version Description
4.4.0 The $tag parameter was added.
2.6.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/editable_slug