editable_slug WordPress Filter Hook
The editable_slug hook allows you to modify the post slug before it is saved to the database. This can be useful for customizing the URL structure of your site.
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
Source
Changelog
Version | Description |
---|---|
4.4.0 | The $tag parameter was added. |
2.6.0 | Introduced. |