Using WordPress for so long has been very annoying WordPress article revision and automatic save function, also used the Super Switch plugin can prohibit WordPress article revision and automatic save function, but their blog plug-ins have enough, Have to modify the WordPress main program to prevent article revision and automatic save function. But this method has a bad place is, each WordPress upgrade, you have to change the WordPress source code, it is very troublesome. I accidentally bumped into the ZWW blog on the discovery of this plugin-free to modify the source code to achieve WordPress ban revision and automatic preservation of the method, share to everyone!
Using the method is simple, as long as the functions.php in the subject directory to add the appropriate code, the code is as follows:
Copy Code code as follows:
/* Remove auto Save and revise version * *
Remove_action (' pre_post_update ', ' wp_save_post_revision ');
Add_action (' wp_print_scripts ', ' disable_autosave ');
function Disable_autosave () {
Wp_deregister_script (' AutoSave ');
}
Test environment: WordPress 3.1.2, the principle of more than 3.0 support.