This article mainly introduces how to perfect wordpress ban Article revision and Automatic Storage. For more information, see
This article mainly introduces how to perfect wordpress ban Article revision and Automatic Storage. For more information, see
Wordpress's article revision and automatic saving functions have been annoying for so long. You have also used the super switch plug-in to disable wordpress Article revision and automatic saving, however, there are already enough plug-ins in your blog, so you have to modify the wordpress main program to disable Article 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.