WordPress.org

Ready to get started?Download WordPress

Forums

How to display a list of revisions on the displayed post (not in admin/edit ui)? (4 posts)

  1. dnorman
    Member
    Posted 5 years ago #

    I'm using WordPress (WPMU) with several professors who are having students post and comment as part of their class activities.

    They'd like to be able to see at a glance what the revision history is for a post, without having to gain admin access to the blog to view the edit interface for the post.

    Is there a way I can add an audit trail for revision history on a post as it's displayed on a blog? Something like a footer or popup with a list of edits (times, dates, authors, links to view the revision...)?

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    Look closer at the wp_list_post_revisions() function.

  3. dnorman
    Member
    Posted 5 years ago #

    Thanks! That's exactly what I needed. I've hacked in the display for a test theme, and am now working on building a simple plugin that can display that info on any theme.

  4. dnorman
    Member
    Posted 5 years ago #

    OK. I've written a VERY simple plugin that uses a Filter to process the $content for a post and append the revisions list. I had to copy the wp_list_post_revisions() function and modify it, because the "real" function just dumps the list via echo, rather than returning a string for display.

    Now to see if I can submit my hacked plugin to WordPress.org/extend/plugins...

Topic Closed

This topic has been closed to new replies.

About this Topic