Show history of post revisions on front end

Your shortcode calls wp_list_post_revisions() which echo the output (revision list), hence you get the “updating error”. To fix the issue, you can use output buffering like so: ob_start(); wp_list_post_revisions( get_the_ID() ); $revisions = ob_get_clean(); Or you could use wp_get_post_revisions() and build the HTML list manually. Here’s an example based on the wp_list_post_revisions(): $output=””; if ( … Read more

Max Number of Post Versions Supported

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

Revert multiple posts to an older revision?

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

Enable post revisions for a specific post

Since the check is made in wp_revisions_to_keep($post) in wp-includes/revision.php, and the result is run through a filter, you should be able to do something like this: <?php function wpse_289553($num, $post) { if(in_array($post->ID, array(123, 456, 789))) { return -1; } return $num; } add_filter(“wp_revisions_to_keep”, “wpse_289553”, 10, 2); Set your post IDs in that array and adjust … Read more

Manually removing revision post types

IF you want, you can disable revisions in first place (No need to run CRON then) To disable them go to wp-config.php and add this line: define(‘WP_POST_REVISIONS’, false ); Or to limit to 10 revisions define(‘WP_POST_REVISIONS’, 10); And to delete all current revisions you can run this SQL query: DELETE FROM wp_posts WHERE post_type = … Read more

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