<?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>Orzeszek Blog &#187; WordPress plugins</title>
	<atom:link href="http://www.orzeszek.org/blog/tag/wordpress-plugins/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.orzeszek.org/blog</link>
	<description>An inchoate upside-down perspective</description>
	<lastBuildDate>Thu, 05 Jan 2012 16:42:39 +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>How to Get Rid of Temporary Posts Used for Theme Detection Permanently</title>
		<link>http://www.orzeszek.org/blog/2009/11/17/how-to-get-rid-of-temporary-posts-used-for-theme-detection-permanently/</link>
		<comments>http://www.orzeszek.org/blog/2009/11/17/how-to-get-rid-of-temporary-posts-used-for-theme-detection-permanently/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 08:52:18 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Windows Live Writer]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress plugins]]></category>

		<guid isPermaLink="false">http://www.orzeszek.org/blog/?p=929</guid>
		<description><![CDATA[Windows Live Writer is an exceptional tool for blogging. But it relies on an inelegant mechanism to detect the theme used by your blog. The result is an Internet littered with Temporary Posts Used For Theme Detection. Thankfully, you can use a WordPress plugin to prevent these posts from ever appearing on your website.]]></description>
			<content:encoded><![CDATA[<p></p><p><img src="http://www.orzeszek.org/blog/wp-content/uploads/2009/11/live-writer-icon.png" alt="Windows Live Writer icon" title="Windows Live Writer icon" width="128" height="128" class="alignright size-full wp-image-948 orz-img-no-border" /></p>
<p><span class="drop_cap">W</span>indows Live Writer (<a href="http://download.live.com/writer">download</a>) is an exceptional tool for blogging. But its most useful feature, WYSIWYG editing, relies on an inelegant mechanism to detect the theme used by your blog.</p>
<p>To detect the theme, Windows Live Writer will publish a skeleton post to your blog, read it and save its theme, and then delete it. Sometimes the post isn’t deleted. Other times, it’s indexed by Google, FeedBurner, or other similar services before it’s deleted.</p>
<p>The result is an Internet <a href="http://www.google.com/search?q=Temporary%20Post%20Used%20For%20Theme%20Detection">littered</a> with Temporary Posts Used For Theme Detection.</p>
<p>Obsessive compulsives like me don’t want these posts associated with their blogs. Thankfully, it turns out that you can write a plugin for WordPress to prevent these posts from <em>ever</em> appearing on your website.</p>
<div class="orz-codeblock">
<p><code>&lt;?php<br />
      /*<br />
      Plugin Name: Orzeszek Live Writer Helper<br />
      Plugin URI: http://www.orzeszek.org/blog/<br />
      Version: 1.0<br />
      Author: Orzeszek<br />
      Author URI: http://www.orzeszek.org/blog/<br />
      Description: Prevents the Temporary Post Used For Theme Detection from ever appearing on your blog.<br />
      */</code></p>
<p><code>function orz_posts_where($where)<br />
      {<br />
      &#160;&#160; if(!is_admin() &amp;&amp; strpos($_SERVER['HTTP_USER_AGENT'],<br />
      &#160;&#160;&#160;&#160;&#160; 'Windows Live Writer') === false)<br />
      &#160;&#160; {<br />
      &#160;&#160;&#160;&#160;&#160; if ($where != '')<br />
      &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $where .= ' AND ';</code></p>
<p><code>&#160;&#160;&#160;&#160;&#160; $where .= 'post_title NOT LIKE ' .<br />
      &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; '\'Temporary Post Used For % Detection (%)\'';<br />
      &#160;&#160; }<br />
      &#160;&#160; return $where;<br />
      }</code></p>
<p><code>add_filter('posts_where', 'orz_posts_where');<br />
      ?&gt;</code></p>
</div>
<p>Create a new text file called <strong>orz-live-writer-helper.php</strong>. Copy and paste the above code into that text file, and save it.</p>
<p><span id="more-929"></span></p>
<p class="note">Make sure that the very first characters in <strong>orz-live-writer-helper.php</strong> are <strong>&lt;?</strong> and that the very last characters are <strong>?&gt;</strong>. If they’re not (for instance, if you have a space after <strong>?&gt;</strong>), you may get a ‘Warning: Cannot modify header information – headers already sent…’ message. <a href="http://www.tech-recipes.com/rx/1489/solve-php-error-cannot-modify-header-information-headers-already-sent/">More info.</a></p>
<p>Create a new directory called <strong>orz-live-writer-helper</strong> in your <strong>wp-content/plugins</strong> directory, and upload <strong>orz-live-writer-helper.php</strong> to the new directory. Finally, activate the plugin by logging into WordPress as an administrator, selecting <strong>Plugins</strong> from the menu, and selecting <strong>Activate</strong> for the <strong>Orzeszek Live Writer Helper</strong> plugin.</p>
<p>The plugin works by hiding any post where the title is ‘Temporary Post Used For * Detection (*)’ from all pages on your blog, as well as from your RSS feed. Users and bots accessing your site, or your RSS feed, won’t be able to see the temporary post.</p>
<p>You can still view the post when logged into the management interface (ie, when logged into <strong>wp-admin</strong>), so that you can delete the post if it hasn’t been deleted automatically. And, of course, Windows Live Writer can see it too, so that its theme detection engine continues to work.</p>
<p>Hopefully, this will end the flood of Temporary Posts Used For Theme Detection, at least on WordPress blogs.</p>
<p><strong>Note:</strong> The present version of Windows Live Writer creates a post titled ‘Temporary Post Used For Theme Detection (*)’. Old versions created posts titled ‘Temporary Post Used For Style Detection (*)’.</p>
<p>If, in a future release, the title of the temporary post changes to something other than ‘Temporary Post Used For * Detection (*)’, you will need to update the code accordingly. (The <strong>%</strong> is a <a href="http://www.w3schools.com/SQl/sql_wildcards.asp">wildcard</a> in the SQL <a href="http://www.w3schools.com/SQl/sql_where.asp">WHERE</a> clause.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.orzeszek.org/blog/2009/11/17/how-to-get-rid-of-temporary-posts-used-for-theme-detection-permanently/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Change the Tag Cloud Font Size in WordPress 2.8</title>
		<link>http://www.orzeszek.org/blog/2009/06/11/change-the-tag-cloud-font-size-in-wordpress-2-8/</link>
		<comments>http://www.orzeszek.org/blog/2009/06/11/change-the-tag-cloud-font-size-in-wordpress-2-8/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 14:14:39 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[tag cloud]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress plugins]]></category>

		<guid isPermaLink="false">http://www.orzeszek.org/blog/?p=688</guid>
		<description><![CDATA[One of the annoyances about the default tag cloud widget in WordPress is that there is no easy way to change the minimum and maximum font size that the widget uses. While the recent release of WordPress 2.8 doesn’t add any UI to change those sizes, it’s now easier to change them than before.]]></description>
			<content:encoded><![CDATA[<p></p><p><span class="drop_cap">O</span>ne of the annoyances about the default tag cloud widget in WordPress is that there is no easy way to change the minimum and maximum font size that the widget uses. While the <a href="http://wordpress.org/development/2009/06/wordpress-28/">recent release of WordPress 2.8</a> doesn’t add any UI to change those sizes, it’s now easier to change them than before.</p>
<p><img src="http://www.orzeszek.org/blog/wp-content/uploads/2009/06/tag-clouds.png" alt="WordPress tag clouds" title="WordPress tag clouds" width="501" height="262" class="aligncenter size-full wp-image-694 orz-img-no-border" /></p>
<p>WordPress 2.8 adds a new <strong>widget_tag_cloud_args</strong> <a href="http://codex.wordpress.org/Plugin_API#Filters">filter</a>, which you can use to override the default arguments that are passed to the <strong>wp_tag_cloud</strong> function. The filter provides a keyed array, where the <strong>smallest</strong>, <strong>largest</strong>, and <strong>unit</strong> keys represent the smallest font size, the largest font size, and the unit (‘pt’, ‘em’, ‘px’, etc) used by the default tag cloud widget.</p>
<p>You can change the minimum and maximum font size that the default tag cloud widget uses in WordPress 2.8 by <a href="http://codex.wordpress.org/Writing_a_Plugin">creating a new plugin</a> that hooks that filter as explained below.</p>
<p><span id="more-688"></span></p>
<p>Create a new text file called <strong>orz-tag-cloud.php</strong>. Copy and paste the following code into that text file, changing the relevant values (shown in bold) as desired, and save it.</p>
<div class="orz-codeblock">
<p><code>&lt;?php<br />
/*<br />
Plugin Name: Orzeszek Tag Cloud<br />
Plugin URI: http://www.orzeszek.org/blog/<br />
Version: 1.1<br />
Author: Orzeszek<br />
Author URI: http://www.orzeszek.org/blog/<br />
Description: Changes the font sizes used by the tag cloud widget.<br />
*/</code></p>
<p><code>function orz_tag_cloud_filter($args = array()) {<br />
&nbsp;&nbsp;&nbsp;$args['smallest'] = <strong>8</strong>;<br />
&nbsp;&nbsp;&nbsp;$args['largest'] = <strong>12</strong>;<br />
&nbsp;&nbsp;&nbsp;$args['unit'] = '<strong>pt</strong>';<br />
&nbsp;&nbsp;&nbsp;return $args;<br />
}</code></p>
<p><code>add_filter('widget_tag_cloud_args', 'orz_tag_cloud_filter', 90);<br />
?&gt;</code></p>
</div>
<p>Create a new directory called <strong>orz-tag-cloud</strong> in your <strong>wp-content/plugins</strong> directory, and upload <strong>orz-tag-cloud.php</strong> to the new directory. Finally, activate the plugin by logging into WordPress as an administrator, selecting <strong>Plugins</strong> from the menu, and selecting <strong>Activate</strong> for the <strong>Orzeszek Tag Cloud</strong> plugin.</p>
<p class="note">Make sure that the very first characters in <strong>orz-tag-cloud.php</strong> are <strong>&lt;?</strong> and that the very last characters are <strong>?&gt;</strong>. If they’re not (for instance, if you have a space after <strong>?&gt;</strong>), you may get a ‘Warning: Cannot modify header information – headers already sent…’ message. <a href="http://www.tech-recipes.com/rx/1489/solve-php-error-cannot-modify-header-information-headers-already-sent/">More info.</a></p>
<p><strong>Update 1:</strong> I updated the plugin to be even simpler and more streamlined. I had originally adapted the plugin from a more complex plugin that provides certain functionality specific to my blog. The original class structure was unnecessary for this simple plugin, however.</p>
<p><strong>Update 2:</strong> I updated the instructions to place the <strong>orz-tag-cloud.php</strong> in its own folder to minimise the potential for conflicts with other plugins.</p>
<p><strong>Update 3:</strong> Added a note indicating the cause of the ‘Warning: Cannot modify header information – headers already sent…’ message, and how to avoid it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.orzeszek.org/blog/2009/06/11/change-the-tag-cloud-font-size-in-wordpress-2-8/feed/</wfw:commentRss>
		<slash:comments>78</slash:comments>
		</item>
	</channel>
</rss>

