Hooking the actions column of revision tabl (2 posts)

  1. drp.lee
    Posted 3 years ago #

    I'm looking for a way of adding one or two additional features to the revisions table. Mainly what i want to do is allow a new post to be created from an old revision (sort of like forking).

    Looking at the source code: http://wpseek.com/wp_list_post_revisions/ i can see that the table is built without using the wordpress table builder class like the post's table uses.

    This means that the $actions variable is completely isolated from plugins, which is where i am stuck. I DO NOT want to edit the core wordpress file's as the site needs to remain update-able without me having to apply patches on every core update.

    Does anyone have any idea's of how to do what i want? My best idea so far (which ive literally come up with while typing this message, which is usually the way), is to surpress the revisions box, then create a plugin which calls the wp_list_post_revisions() function, but wraps it in an output buffer, then use regex (or the like) to work out where in the output html i need to inject my links, inject them into the html, then print to the screen.

    Any better / nicer solutions would be appreciated (or simply if this is the best way, then how do i keep WP making revisions, but disable the revisions box on this specific post type).

  2. jenUnderscore_
    Posted 3 years ago #

    I found this, and have the same question.

    Did you get any further on this. I highly suspect this whole function needs to be re-written in a more "hook-able" way. I too do not want to re-write the entire feature, but it's looking that way.

    WordPress, is this something that is being worked on?


Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.