CartMetrix - Do you know yours?

Revision History Plugin

Editing a post is a necessity from time to time, especially with any type of coding related blog. I particularly like to keep older posts up to date with revised download links as new versions are released. This prevents a user following a link off of a search engine to an old post and downloading an old version of one of my pieces of code. Surprisingly, I could not find a Wordpress plugin to do just this. This tiny plugin allows you to attach timestamped revision tags to a post using the Wordpress metadata system.

For an example in action see the Post History heading after this post.

Installation

  1. Download and unzip wp_revision_history.zip
  2. Upload revision_history.php to your Wordpress wp-content/plugins/ directory.
  3. Add the following CSS to your stylesheet. Change CSS to match your site layout.
    #revision-date  {
            padding: 3px 5px 3px 12px;
            font-weight: bold;
            color: #333;
    }

    #revision       {
            padding: 2px 5px 8px 18px;
            color: #555;

    }

  4. Add the following snippet to your template where you want a post’s revision
    history to display

    <?php if(function_exists(‘wp_has_history’) && wp_has_history())   {  ?>
    <h3>Post History</h3>
    <div class=“cmeta” style=“bottom-margin: 20px;” id=“history”>
    <?php wp_history(); ?> 
    </div>
    <? } ?>

Usage

To add a revision tag to a post, add a new custom field named ‘history’ to the post. Set the custom field’s value to the revision note text. Multiple revision tags may be made to the same post by adding more custom fields with the key ‘history’. Each note will be automatically timestamped. The history listing will be sorted by the timestamp value.

Download Wordpress Revision History

Popularity: 2%


damonparker.org is proudly powered by WordPress
Entries (RSS) and Comments (RSS).

copyright © 2002-2008 damonparker.org. all rights reserved.

Close
E-mail It