Forums

Plugin: Sync Draft Slug and Title (1 post)

  1. coffee2code
    Member
    Posted 4 years ago #

    Plugin: Sync Draft Slug and Title

    Description:
    While a post is still a draft, keep the post slug in sync with any changes to the post title.

    Details can be found at the plugin's homepage:
    http://www.coffee2code.com/archives/2005/03/26/plugin-sync-draft-slug-and-title/

    All of my plugins can be found at:
    http://www.coffee2code.com/wp-plugins/

    So what does this plugin do?
    Currently in WP 1.5, the post slug (which is what is used to create the nice permalink URL to the post) is formulated the first time you save a post, even if you save a post as a draft. If you later change the title of the post while it is still in draft status (and thus never publically available and linked, and therefore no threat to breaking permalinks should you change the post slug) the post slug is not updated. This plugin attempts to address this.

    Notes:
    * This plugin assumes that you NEVER manually define the post slug. If you try to do so it will be ignored. If a post is currently published, changing the title will NOT update the post slug since you may break any potential links to your post (thus defeating the "perma" part of permalinks). However, you can change the value of the $update_published_posts argument to 1 to ALWAYS keep the post slug in sync, even when editing already published posts.

    * WordPress v1.5.1 will likely address the need to keep the post slug in sync with the post title for drafts, and will do so in a much cleaner manner (since a clean solution requires changes to the core code). At the point in time of the release of this plugin, the bleeding-edge development version of WP 1.5.1 only has partial support for this. So this plugin may only have applicability to WP 1.5 only if 1.5.1 follows through on addressing this issue. See Mantis bug #1073 : http://mosquito.wordpress.org/view.php?id=1073

Topic Closed

This topic has been closed to new replies.

About this Topic