Allow a non-author to see revisions of a post

Basic solution Let’s create new role translator, with capabilities matching capabilities of author role. Insert the code below to functions.php of your current theme: function wpse_add_translator_role() { if ( empty( get_role( ‘translator’ ) ) ) { $role = get_role( ‘author’ ); add_role( ‘translator’, ‘Translator’, $role->capabilities ); } } add_action( ‘init’, ‘wpse_add_translator_role’, 10 ); Once the … Read more

Cannot limit post revisions

The option works from the moment you add it to your wp-config.php file. You can try to remove the old revisions using something like this Just back-up your db first.

Public (Non-Admin) Post Edit/Revision History

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

Is it possible to set custom post type revision limit inside the theme files?

I had a look at the wp_revisions_to_keep() function. There’s a filter called wp_revisions_to_keep that overrides the value of WP_POST_REVISIONS. Here’s an untested example (PHP 5.4+): add_filter( ‘wp_revisions_to_keep’, function( $num, $post ) { // Post Types and Revision Numbers – Edit to your needs $config = [ ‘post’ => 10, ‘page’ => 9, ‘cpt’ => 8 … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)