In which version of wordpress was it implemented that the revisions to the posts will be saved. I need a version without that function or disable it- thanks
1 Answer
It's not a good idea to run old versions of WordPress. Fortunately, you can quite easily turn off post revisions by using the wp_revisions_to_keep
filter.
Add the following code snippet to a plugin, or to your active theme's functions.php
file:
add_filter( 'wp_revisions_to_keep', 'wpse_368635_disable_revisions' );
function wpse_368635_disable_revisions( $revisions ) {
// Setting the value to 0 will disable revisions.
return 0;
}
This will disable post revisions, except for a single autosave. See Revisions for more information.
WP_POST_REVISIONS
.