<?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>Caneblu.com &#187; autosave</title>
	<atom:link href="http://www.caneblu.com/tag/autosave/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.caneblu.com</link>
	<description>Solo un altro blog targato WordPress</description>
	<lastBuildDate>Mon, 10 May 2010 20:32:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>WordPress: Disable autosave</title>
		<link>http://www.caneblu.com/2010/02/wordpress-disable-autosave/</link>
		<comments>http://www.caneblu.com/2010/02/wordpress-disable-autosave/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 16:27:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[autosave]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://www.caneblu.com/?p=128</guid>
		<description><![CDATA[One of the nice features that the Ajax has brought with it, is surely the autosave. When we write a new article, a special javascript allows you to save, within a specified timeframe, the draft we have produced. For example we are writing and you lose connection, or for majeure force you must dedicate ourselves [...]]]></description>
			<content:encoded><![CDATA[<p>One of the nice features that the <strong>Ajax</strong> has brought with it, is surely the autosave. When we write a new article, a special <strong>javascript</strong> allows you to save, within a specified timeframe, the draft we have produced. For example we are writing and you lose connection, or for majeure force you must dedicate ourselves to something else, without this handy feature we will be with the &#8220;old&#8221; time-out page and we will have to rewrite everything from scratch. Despite its usefulness, however, there may have needs for which this function is counterproductive.</p>
<p>The developers of <strong>WordPress</strong> have a far-sighted thinking to specific functions of &#8220;changing the classification&#8221; of some PHP classes. So to disable autosaving you must add a specific function in the file <strong>functions.php</strong> present among the files of your theme.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> disableAutoSave<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>wp_deregister_script
    <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'autosave'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#41;</span>
&nbsp;
add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'wp_print_scripts'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'disableAutoSave'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Function wp_deregister precisely intercept the script and disable autosave. If we want to rehabilitate the function we need to delete the lines above.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.caneblu.com/2010/02/wordpress-disable-autosave/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
