[wp-trac] [WordPress Trac] #60675: Add hook for wp_check_for_changed_slugs()
WordPress Trac
noreply at wordpress.org
Mon Apr 15 05:25:24 UTC 2024
#60675: Add hook for wp_check_for_changed_slugs()
-------------------------+------------------------------
Reporter: Tkama | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Permalinks | Version: 6.4.3
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------+------------------------------
Comment (by chrismaker):
You're correct! WordPress already has functionality to handle situations
where a post slug (post_name) conflicts with an existing one. When you
attempt to save a post with a slug that already exists, WordPress
automatically appends a suffix (e.g., -2, -3, etc.) to make it unique.
This behavior helps prevent conflicts and ensures that each post has a
unique slug within its post type.
So, even if you change the slug of a post after publishing, WordPress will
automatically handle any conflicts with existing slugs by appending the
appropriate suffix. Therefore, the concern about the old slug being saved
unnecessarily may not be as significant because WordPress already manages
duplicate slugs in a way that ensures uniqueness.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60675#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list