Perfect way to disable Article revision and Automatic Storage in wordpress

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.