Wordpress 自动草稿禁用 [英] Wordpress Auto Draft disabling

查看:30
本文介绍了Wordpress 自动草稿禁用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Wordpress v.3.3.1,并启用多站点管理.

我正在尝试禁用自动草稿功能,但似乎我已经尝试了一切.

我尝试过的:

define('WP_POST_REVISIONS', false);定义('WP_POST_REVISIONS',假);

没用.

我试图删除 post-new.php、post-php 中的 auto_save 行.在 wp-includes 和 wp-admin 中.没用.

我也试过好几个插件了,都不行!知道为什么吗?

解决方案

我注意到您询问的是禁用自动草稿而不是自动保存.>

您不能禁用自动保存,但您可以通过设置长间隔来实现类似的效果,例如:

define('AUTOSAVE_INTERVAL', 3600);//默认值为 60

(您可以将其添加到 WordPress 站点的 wp-config.php 文件中.)

至于自动草稿,您不想禁用它们.他们在那里有一个重要的原因.让我为你引出一两个报价...

Samuel 'Otto' Wood,Audrey Capital(Matt Mullenweg 的天使投资公司)的技术忍者,:

<块引用>

自动草稿的存在是因为多个用户可以同时创建新帖子.如果两个人大致在同一时刻进入 post-new,然后他们的第一次自动保存几乎同时发生,那么就会存在竞争条件,可能会导致其中一个人取回错误的帖子 ID,这将导致帖子被覆盖/lost 然后他们继续编辑帖子.

自动草稿创建帖子并在显示编辑屏幕之前获取新帖子的 ID,从而防止两个同时作者在浏览器的数据中意外拥有相同的帖子 ID.

Andrew Ozz,负责 WordPress 的 TinyMCE 集成,:

<块引用>

这样还可以在保存初稿之前上传图片,并将它们正确附加到新帖子中.

最后:

<块引用>

自动草稿会在未使用 7 天后自动删除.它们基本上是自清洁的.无需担心它们.

I am using Wordpress v.3.3.1 With Multisite management on.

I am trying to disable the auto draft function, but it seems that I have tried everythig.

What I have tried:

define('WP_POST_REVISIONS', false);

define('WP_POST_REVISIONS', false);

Didn't work.

I have tried to remove the auto_save lines in post-new.php, post-php. Both in wp-includes and in wp-admin. Didn't work.

I have also tried several plugins, but they won't do it! Any idea why?

解决方案

I notice that you are asking about disabling Auto-Drafts and NOT Auto-Save.

You cannot disable Auto-save, but you can achieve a similar affect by setting a long interval, for example:

define( 'AUTOSAVE_INTERVAL', 3600 ); // Default is 60

(You'd add it in your WordPress site's wp-config.php file.)

As for Auto-Drafts, you don't want to disable them. They are there for an important reason. Let me grab a quote or two for ya...

Samuel 'Otto' Wood, Tech Ninja at Audrey Capital (Matt Mullenweg's angel investment company), says:

Auto-drafts exist because of the fact that multiple users can create new posts at the same time. If two people enter post-new at roughly the same moment, then have their first autosaves occur nearly simultaneously, then there is a race condition that can cause one of them to get back the wrong post ID, which will cause a post to be overwritten/lost when they then continue editing the post.

The auto-draft creates the post and gets the ID of the new post before the editing screen is displayed, thus preventing two simultaneous authors from accidentally having the same post ID in the data in their browser.

Andrew Ozz, who worked on WordPress' TinyMCE integration, says:

This also makes it possible to upload images before the first draft is saved and they will be properly attached to the new post.

And lastly:

Auto-drafts are automatically deleted after 7 days of going unused. They're self-cleaning, basically. No need to worry about them.

这篇关于Wordpress 自动草稿禁用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆