This article mainly introduces how to perfect wordpress Document Revision and automatic saving. if you need it, you can refer to the article revision and automatic saving features that have been annoying for so long using Wordpress, you have also used the superswitch plug-in to disable wordpress article revision and automatic saving, but you already have enough plug-ins for your blog, you have to modify the wordpress main program to disable Document Revision and automatic saving. However, a bad thing about this method is that every time you upgrade wordpress, you have to change the wordpress source code again, which is really troublesome. I accidentally hit the ZWW blog today and found this non-plug-in-free source code to implement wordpress's method of prohibiting article revision and automatic saving. let's share it with you!
The usage is simple. you only need to add the corresponding code in functions. php in the topic directory. the code is as follows:
The code is as follows:
/* Remove auto save and revision */
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, which is supported by more than 3.0 of the principle.