Preview previous revision without restoring it
Preview previous revision without restoring it
Preview previous revision without restoring it
I would not recommend the Save as Draft approach as I don’t believe it will help you accomplish your ultimate goal. WordPress is saving revisions in a non-public Post Type (more info here). I found a “Changelog” plugin, which may help track changes to existing blog posts. You can see that here https://wordpress.org/plugins/awesome-changelog/. Finally, a … Read more
I resolved this in the end by removing access to the revisions meta box for certain user types… if (get_current_user_role()==”custom_user_role”){ function my_remove_revisions() { remove_meta_box(‘revisionsdiv’, ‘apartments’, ‘normal’); } add_action( ‘admin_menu’, ‘my_remove_revisions’ ); }
You should set WP_POST_REVISIONS to a fixed number. If you don’t, WordPress will keep an unlimited number of revisions. See function wp_revisions_to_keep(): function wp_revisions_to_keep( $post ) { $num = WP_POST_REVISIONS; if ( true === $num ) $num = -1; else $num = intval( $num ); if ( ! post_type_supports( $post->post_type, ‘revisions’ ) ) $num = … Read more
Probably is a way with an SQL query. But another solution is to use Search RegEx, which is a good plugin to be able to search and replace with grep and regular expressions through all posts and pages. And I’d delete all your revisions to make sure the links aren’t hidden in old revisions that … Read more
Schedule Page/CPT Revisions
Front end URL to restore a post/page
Display an old revision of a post in WP front-end theme, are there functions for this?
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
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.