gpt4 book ai didi

WordPress 自动草稿禁用

转载 作者:行者123 更新时间:2023-12-02 23:04:06 29 4
gpt4 key购买 nike

我使用的是 Wordpress v.3.3.1,并启用了多站点管理。

我正在尝试禁用自动草稿功能,但似乎我已经尝试了所有方法。

我尝试过的:

define('WP_POST_REVISIONS', false);

define('WP_POST_REVISIONS', false);

没用。

我尝试删除 post-new.php、post-php 中的 auto_save 行。在 wp-includes 和 wp-admin 中。没有成功。

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

最佳答案

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

您无法禁用自动保存,但可以通过设置较长的间隔来达到类似的效果,例如:

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

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

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

Samuel 'Otto' Wood,Audrey Capital(Matt Mullenweg 的天使投资公司)的技术忍者,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,负责 WordPress 的 TinyMCE 集成,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 自动草稿禁用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10234271/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com