<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>木木木木木 &#187; 禁用</title>
	<atom:link href="http://immmmm.com/tag/%e7%a6%81%e7%94%a8/feed" rel="self" type="application/rss+xml" />
	<link>http://immmmm.com</link>
	<description>不问明天，悠然浪费</description>
	<lastBuildDate>Mon, 06 Feb 2012 10:56:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>禁用WordPress自动保存与修订历史</title>
		<link>http://immmmm.com/disable-wordpress-autosave-and-revision.html</link>
		<comments>http://immmmm.com/disable-wordpress-autosave-and-revision.html#comments</comments>
		<pubDate>Tue, 06 Jan 2009 14:39:33 +0000</pubDate>
		<dc:creator>林木木</dc:creator>
				<category><![CDATA[折腾无休]]></category>
		<category><![CDATA[WordPress技巧]]></category>
		<category><![CDATA[禁用]]></category>

		<guid isPermaLink="false">http://immmmm.com/?p=1029</guid>
		<description><![CDATA[为什么要禁用WordPress自带的这两个功能呢？最大的原因是造成文章ID严重不连续！当然，也有相关的插件能禁用这两个功能的，不过个人喜欢能通过改代码实现的坚决不用插件，以干掉插件为荣！ 方法步骤： 一、禁用自动保存 WordPress程序下wp-admin文件夹中找到“post.php，page.php，post-new.php，page-new.php”这四个文件，打开并搜索以下代码： wp_enqueue_script&#40;'autosave'&#41;; 每个文件里只会有一个搜索结果，然后大胆的在其前面加上“//”即可； 附修改后的四个文件：disable-autosave.7z (提取自最新版WordPress2.9) 二、禁用修订历史 WordPress程序根目录下的wp-config.php，打开并加上: 58 define&#40;'WP_POST_REVISIONS',false&#41;; OK，就是如此简单！]]></description>
			<content:encoded><![CDATA[<p>为什么要禁用WordPress自带的这两个功能呢？最大的原因是造成文章ID严重不连续！当然，也有相关的插件能禁用这两个功能的，不过个人喜欢能通过改代码实现的坚决不用插件，以干掉插件为荣！</p>
<p><strong><span style="color: #3366ff;">方法步骤：</span></strong></p>
<p><strong>一、禁用自动保存</strong></p>
<p>WordPress程序下wp-admin文件夹中找到“<strong>post.php</strong>，<strong>page.php</strong>，<strong>post-new.php</strong>，<strong>page-new.php</strong>”这四个文件，打开并搜索以下代码：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:Microsoft Yahei;">wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'autosave'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>每个文件里只会有一个搜索结果，然后大胆的在其前面加上“<span style="color: #ff0000;"><strong>//</strong></span>”即可；</p>
<p>附修改后的四个文件：<a href="https://dl-web.dropbox.com/u/837457/disable-autosave.7z">disable-autosave.7z</a> (提取自最新版WordPress2.9)</p>
<p><strong>二、禁用修订历史</strong></p>
<p>WordPress程序根目录下的wp-config.php，打开并加上:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>58
</pre></td><td class="code"><pre class="php" style="font-family:Microsoft Yahei;"><span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WP_POST_REVISIONS'</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>OK，就是如此简单！</p>
]]></content:encoded>
			<wfw:commentRss>http://immmmm.com/disable-wordpress-autosave-and-revision.html/feed</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
	</channel>
</rss>

