<?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>Code == Poetry &#187; and</title>
	<atom:link href="http://www.codeispoetry.ru/author/admin/feed" rel="self" type="application/rss+xml" />
	<link>http://www.codeispoetry.ru</link>
	<description>Developer blog</description>
	<lastBuildDate>Sat, 22 Jan 2011 12:13:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>Show future posts in WP</title>
		<link>http://www.codeispoetry.ru/5</link>
		<comments>http://www.codeispoetry.ru/5#comments</comments>
		<pubDate>Wed, 30 Sep 2009 20:11:11 +0000</pubDate>
		<dc:creator>and</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[future posts]]></category>

		<guid isPermaLink="false">http://codeispoetry.ru/?p=5</guid>
		<description><![CDATA[Here is a code snippet I&#8217;ve made with the help of someone on the WP forums. I&#8217;ve also made a website which acts as a calender/overview for future posts by users. A while later I will publish it as a plug-in which does the same trick. add_filter('the_posts', 'show_future_posts'); function show_future_posts($posts) { global $wp_query, $wpdb; if(is_single() [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a code snippet I&#8217;ve made with the help of someone on the WP forums. I&#8217;ve also made a website which acts as a calender/overview for future posts by users.<br />
A while later I will publish it as a plug-in which does the same trick.<span id="more-5"></span></p>
<pre class="brush: php">add_filter('the_posts', 'show_future_posts');

function show_future_posts($posts)
{
 global $wp_query, $wpdb;

 if(is_single() &amp;&amp; $wp_query-&gt;post_count == 0)
 {
  $posts = $wpdb-&gt;get_results($wp_query-&gt;request);
 }

 return $posts;
}
</pre>
<p>This code allows to show any future post on a post view page only, so your visitors can access a future post pages only if they have a direct link. As you understand you can set any condition instead of <tt>is_single</tt>, even you can remove any conditions and show future posts everywhere on your website.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codeispoetry.ru/5/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disable the WP autosave or revision feature.</title>
		<link>http://www.codeispoetry.ru/31</link>
		<comments>http://www.codeispoetry.ru/31#comments</comments>
		<pubDate>Wed, 30 Sep 2009 20:10:42 +0000</pubDate>
		<dc:creator>and</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://codeispoetry.ru/?p=31</guid>
		<description><![CDATA[These code snippets allows you to disable the autosave or revision function which are turned on by default in WP. function disable_autosave() { wp_deregister_script('autosave'); } add_action( 'wp_print_scripts', 'disable_autosave' ); To disable the revision feature you should add this line somewhere in your wp-config.php: define('WP_POST_REVISIONS', false); download plugin]]></description>
			<content:encoded><![CDATA[<p>These code snippets allows you to disable the autosave or revision function which are turned on by default in WP.</p>
<pre class="brush: php">function disable_autosave() {
 wp_deregister_script('autosave');
}

add_action( 'wp_print_scripts', 'disable_autosave' );
</pre>
<p>To disable the revision feature you should add this line somewhere in your <tt>wp-config.php</tt>:</p>
<pre class="brush: php">define('WP_POST_REVISIONS', false);
</pre>
<p><span id="more-31"></span><a href="http://codeispoetry.ru/wp-content/uploads/2009/10/wp-disable-autosave.zip">download plugin</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.codeispoetry.ru/31/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

