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).
- The topic ‘Hooking the actions column of revision tabl’ is closed to new replies.