Public (Non-Admin) Post EditRevision History

admin2025-06-05  1

Does anyone know of a way to provide an edit history for posts in production? That is, when people look at a post, they can see that it was modified and examine a list of changes like is possible with other sites (below).

I tried looking for a way but everything I found referred to revision histories in the dashboard, not the public-facing side.




Figure 1: StackExchange

Figure 2: TV

Figure 3: Facebook

Does anyone know of a way to provide an edit history for posts in production? That is, when people look at a post, they can see that it was modified and examine a list of changes like is possible with other sites (below).

I tried looking for a way but everything I found referred to revision histories in the dashboard, not the public-facing side.




Figure 1: StackExchange

Figure 2: TV

Figure 3: Facebook

Share Improve this question asked May 20, 2013 at 20:11 SynetechSynetech 3211 gold badge4 silver badges17 bronze badges 2
  • 2 Try to focus your question on more specific approach, good candidate would be how to expose revision history on front end. In current form it's too close to plugin recommendation and such are not in scope of this site. – Rarst Commented May 20, 2013 at 20:36
  • 1 Except that there are no plugins to do this, so it’s not a plugin recommendation question. – Synetech Commented May 21, 2013 at 4:50
Add a comment  | 

2 Answers 2

Reset to default 2

you can grab revisions from wpdb with smth like

$revisions = $wpdb->get_results("select * from {$wpdb->posts} where post_parent={$post_id} and post_type='revision'")

after selecting a revision you could use some js diff tool like

http://cemerick.github.io/jsdifflib/demo.html

I was searching for a similar solution and in fact there is a plugin for this purpose. It was not updated for a long time, but in my testing it is working on WP 4.1.1.

The is issue with comparison table having empty cells, but it is not totally deal breaker. If anyone is more into programming, they probably could improve this plugin. Looks like plugin author is friendly, but is not involved in WP dev. anymore.

"I’m not looking to do any development right now on the plugin, but would be happy to add a developer to the wordpress project to carry on the work, if someone wants to take it up. - source"

http://www.wpbeginner/plugins/how-to-show-post-updatesrevisions-to-your-readers-in-wordpress/

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749133557a316645.html

最新回复(0)