<?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>follow the white rabbit</title>
	<atom:link href="http://blog.ftwr.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ftwr.co.uk</link>
	<description>Random commentary...</description>
	<lastBuildDate>Wed, 06 Jan 2010 14:33:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0-alpha</generator>
		<item>
		<title>More snow!</title>
		<link>http://blog.ftwr.co.uk/archives/2010/01/06/more-snow/</link>
		<comments>http://blog.ftwr.co.uk/archives/2010/01/06/more-snow/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 14:33:32 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Photos]]></category>
		<category><![CDATA[snow]]></category>
		<category><![CDATA[west sussex]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=387</guid>
		<description><![CDATA[It seems like we are in for a cold winter with even more snow falling overnight.
I went out to see how deep it really is this time as it looked deeper than last time &#8211; it turns out we have about 15cm on the grass and about 19cm on the patio where a large amount [...]]]></description>
			<content:encoded><![CDATA[<p>It seems like we are in for a cold winter with even more snow falling overnight.</p>
<p>I went out to see how deep it really is this time as it looked deeper than last time &#8211; it turns out we have about 15cm on the grass and about 19cm on the patio where a large amount fell from the roof.</p>

<a href='http://blog.ftwr.co.uk/archives/2010/01/06/more-snow/lawn/' title='Lawn'><img width="150" height="99" src="http://blog.ftwr.co.uk/wp-content/uploads/2010/01/Lawn.jpg" class="attachment-thumbnail" alt="Snow on the Lawn" title="Lawn" /></a>
<a href='http://blog.ftwr.co.uk/archives/2010/01/06/more-snow/trees-and-more-snow/' title='Trees and more snow'><img width="150" height="99" src="http://blog.ftwr.co.uk/wp-content/uploads/2010/01/Trees-and-more-snow.jpg" class="attachment-thumbnail" alt="Snow on the trees" title="Trees and more snow" /></a>
<a href='http://blog.ftwr.co.uk/archives/2010/01/06/more-snow/patio-snow/' title='Patio Snow'><img width="99" height="150" src="http://blog.ftwr.co.uk/wp-content/uploads/2010/01/Patio-Snow.jpg" class="attachment-thumbnail" alt="Depth of the snow on the patio" title="Patio Snow" /></a>
<a href='http://blog.ftwr.co.uk/archives/2010/01/06/more-snow/grass-snow/' title='Grass Snow'><img width="150" height="100" src="http://blog.ftwr.co.uk/wp-content/uploads/2010/01/Grass-Snow.jpg" class="attachment-thumbnail" alt="Depth of the snow on the grass" title="Grass Snow" /></a>
<a href='http://blog.ftwr.co.uk/archives/2010/01/06/more-snow/drifts-from-the-roof/' title='Drifts from the roof'><img width="99" height="150" src="http://blog.ftwr.co.uk/wp-content/uploads/2010/01/Drifts-from-the-roof.jpg" class="attachment-thumbnail" alt="Drifts of snow which dropped from the roof" title="Drifts from the roof" /></a>

<img src="http://blog.ftwr.co.uk/9538f80a/266bbf5f/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2010/01/06/more-snow/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mangling strings for fun and profit</title>
		<link>http://blog.ftwr.co.uk/archives/2010/01/02/mangling-strings-for-fun-and-profit/</link>
		<comments>http://blog.ftwr.co.uk/archives/2010/01/02/mangling-strings-for-fun-and-profit/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 17:03:36 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[gettext]]></category>
		<category><![CDATA[I10N]]></category>
		<category><![CDATA[I18N]]></category>
		<category><![CDATA[tranlation]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=383</guid>
		<description><![CDATA[As a WordPress lead developer, every time I see someone recommending editing a core WordPress file, a little bit of me dies.
You should always avoid editing the core files and put your modifications into a plugin so as to ensure you have a smooth upgrade experience to a future WordPress version.
Therefore inspired by the following [...]]]></description>
			<content:encoded><![CDATA[<p>As a WordPress lead developer, every time I see someone recommending editing a core WordPress file, a little bit of me dies.</p>
<p>You should always avoid editing the core files and put your modifications into a plugin so as to ensure you have a smooth upgrade experience to a future WordPress version.</p>
<p>Therefore inspired by the following <a href="http://wordpress.org/support/topic/347319" onclick="pageTracker._trackPageview('/outgoing/wordpress.org/support/topic/347319?referer=');">forum post</a> here is how to change one of the translatable strings in WordPress without hacking a core file using the filters available in the translation functions:</p>
<pre class="brush: php;">
&lt;?php
/*
 Plugin Name: PJW Translation Mangler
 Plugin URI: http://blog.ftwr.co.uk/#
 Description: Example of how to mangle translated strings.
 Author: Peter Westwood
 Version: 0.01
 Author URI: http://blog.ftwr.co.uk/
 */

class PJW_Translation_Mangler {
 /**
 * Filter the translation string before it is displayed.
 *
 * @param $translation The current translation
 * @param $text The text being translated
 * @param $context The context for the translation
 * @param $domain The domain for the translation
 * @return string The translated / filtered text.
 */
 function filter_gettext($translation, $text, $domain) {
  $translations = &amp;get_translations_for_domain( $domain );
  if ( $text == 'View all posts filed under %s' ) {
   return $translations-&gt;translate( 'See all articles filed under %s' );
  }
  return $translation;
 }
}
add_filter('gettext', array('PJW_Translation_Mangler', 'filter_gettext'), 10, 4);
?&gt;
</pre>
<p>The filter used in this example <code>gettext</code> is one of a set of filters in the translation functions in <code>wp-includes/l10n.php</code> which also include <code>gettext_with_context</code>, <code>ngettext</code>, and <code>ngettext_with_context</code>.</p>
<img src="http://blog.ftwr.co.uk/9538f80a/266bbf5f/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2010/01/02/mangling-strings-for-fun-and-profit/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>The snow is falling and it is not christmas yet</title>
		<link>http://blog.ftwr.co.uk/archives/2009/12/18/the-snow-is-falling-and-it-is-not-christmas-yet/</link>
		<comments>http://blog.ftwr.co.uk/archives/2009/12/18/the-snow-is-falling-and-it-is-not-christmas-yet/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 10:17:04 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Photos]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=377</guid>
		<description><![CDATA[I can&#8217;t remember the last time we had snow in the UK this close to Christmas.
]]></description>
			<content:encoded><![CDATA[<p>I can&#8217;t remember the last time we had snow in the UK this close to Christmas.</p>

<a href='http://blog.ftwr.co.uk/archives/2009/12/18/the-snow-is-falling-and-it-is-not-christmas-yet/crw_5234/' title='A snowy garden'><img width="150" height="99" src="http://blog.ftwr.co.uk/wp-content/uploads/2009/12/CRW_5234.jpg" class="attachment-thumbnail" alt="A snowy garden" title="A snowy garden" /></a>
<a href='http://blog.ftwr.co.uk/archives/2009/12/18/the-snow-is-falling-and-it-is-not-christmas-yet/crw_5235/' title='A snowy garden'><img width="99" height="150" src="http://blog.ftwr.co.uk/wp-content/uploads/2009/12/CRW_5235.jpg" class="attachment-thumbnail" alt="A snowy garden" title="A snowy garden" /></a>

<img src="http://blog.ftwr.co.uk/9538f80a/266bbf5f/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2009/12/18/the-snow-is-falling-and-it-is-not-christmas-yet/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The moon was bright tonight</title>
		<link>http://blog.ftwr.co.uk/archives/2009/11/03/the-moon-was-bright-tonight/</link>
		<comments>http://blog.ftwr.co.uk/archives/2009/11/03/the-moon-was-bright-tonight/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 21:31:20 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Photos]]></category>
		<category><![CDATA[300D]]></category>
		<category><![CDATA[canon70200f4is]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=371</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;">
<div id="attachment_372" class="wp-caption aligncenter" style="width: 650px"><img class="size-full wp-image-372 " title="The moon tonight" src="http://blog.ftwr.co.uk/wp-content/uploads/2009/11/Moon.jpg" alt="Detailed picture of the moon" width="640" height="427" /><p class="wp-caption-text">Taken with a Canon EOS 300D + 70-200 f4L IS + 1.4x Extender</p></div>
<img src="http://blog.ftwr.co.uk/9538f80a/266bbf5f/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2009/11/03/the-moon-was-bright-tonight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Missing dashboard css and the perils of smart quotes</title>
		<link>http://blog.ftwr.co.uk/archives/2009/09/29/missing-dashboard-css-and-the-perils-of-smart-quotes/</link>
		<comments>http://blog.ftwr.co.uk/archives/2009/09/29/missing-dashboard-css-and-the-perils-of-smart-quotes/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 20:18:08 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[dashboard]]></category>
		<category><![CDATA[smart quotes]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=353</guid>
		<description><![CDATA[This is the tale of a mystery and intrigue about the disappearance of the css from a blogs dashboard and how we hunted it down and fetched it back.
Thord Daniel Hedengren, one of the writers for Blog Herald, put out a plea for help on twitter and was pointed in my direction.
He was faced with [...]]]></description>
			<content:encoded><![CDATA[<p>This is the tale of a mystery and intrigue about the disappearance of the css from a blogs dashboard and how we hunted it down and fetched it back.</p>
<p><a href="http://tdhedengren.com/" onclick="pageTracker._trackPageview('/outgoing/tdhedengren.com/?referer=');">Thord Daniel Hedengren</a>, one of the writers for Blog Herald, put out a <a href="http://twitter.com/tdhedengren/statuses/4467129726" onclick="pageTracker._trackPageview('/outgoing/twitter.com/tdhedengren/statuses/4467129726?referer=');">plea for help on twitter</a> and was <a href="http://twitter.com/markmcwilliams/statuses/4468195682" onclick="pageTracker._trackPageview('/outgoing/twitter.com/markmcwilliams/statuses/4468195682?referer=');">pointed in my direction</a>.</p>
<p>He was faced with a WordPress dashboard which looked like this and wasn&#8217;t much use:</p>
<div id="attachment_357" class="wp-caption aligncenter" style="width: 811px"><img class="size-full wp-image-357" title="Unstyled Dashboard" src="http://blog.ftwr.co.uk/wp-content/uploads/2009/09/unstyled-dashboard.png" alt="WordPress 2.8.4 dashboard without all the styling" width="801" height="667" /><p class="wp-caption-text">WordPress 2.8.4 dashboard without all the styling</p></div>
<p>This evening I hooked up with Thord and with the help of his server administrator we tracked down the issue and thought it a good idea to spread the message to help any one else out there who has a similar issue in the future.</p>
<p>I started off by looking at the headers returned by the php file which concatenates all the CSS files together and noticed something strange:</p>
<pre class="brush: plain;">
HTTP/1.1 200 OK
Server: nginx/0.7.62
Date: Tue, 29 Sep 2009 19:34:47 GMT
Content-Type: text/css;charset=“utf-8″
Connection: keep-alive
X-Powered-By: PHP/5.3.0
Expires: Wed, 29 Sep 2010 19:34:47 GMT
Cache-Control: public, max-age=31536000
Vary: Accept-Encoding
</pre>
<p>As you can see here the Content-Type header looks a little strange, it has a charset specified but the value being returned is not a valid charset and it looks like this is probably why Firefox is refusing to apply this css file to the page.</p>
<p>This was starting to look like a server configuration issue so we got in contact with the <a href="http://twitter.com/jonathansulo/" onclick="pageTracker._trackPageview('/outgoing/twitter.com/jonathansulo/?referer=');">server admin</a> and we tracked down the errant configuration to the php.ini file.</p>
<p>Within the php.ini file you can set a default charset to be used if one has not already been specified for the request this had erroneously been set in the file with some smart quotes rather than normal quotes and so php was outputting the smart quotes as well as the charset name into the HTTP header.</p>
<p>Now the headers look like this and Firefox is happy to display a fully styled WordPress dashboard:</p>
<pre class="brush: plain;">

HTTP/1.1 200 OK
Server: nginx/0.7.62
Date: Tue, 29 Sep 2009 19:39:17 GMT
Content-Type: text/css;charset=utf-8
Connection: keep-alive
X-Powered-By: PHP/5.3.0
Expires: Wed, 29 Sep 2010 19:39:17 GMT
Cache-Control: public, max-age=31536000
Vary: Accept-Encoding
</pre>
<p>In short, check the configuration you use for <code>default_charset</code> in your php.ini file and don&#8217;t use any quotes unless you need to the following works fine in my testing:</p>
<pre class="brush: plain;">

default_charset = utf-8
</pre>
<img src="http://blog.ftwr.co.uk/9538f80a/266bbf5f/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2009/09/29/missing-dashboard-css-and-the-perils-of-smart-quotes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Feeding on feedback and progress</title>
		<link>http://blog.ftwr.co.uk/archives/2009/09/10/feeding-on-feedback-and-progress/</link>
		<comments>http://blog.ftwr.co.uk/archives/2009/09/10/feeding-on-feedback-and-progress/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 21:18:55 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[rss2email]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=343</guid>
		<description><![CDATA[Keeping track of a projects progress is a common desire and if the project you are interested in happens to be a WordPress plugin then there are a number of RSS feeds which are an important resource for you (replace plugin_slug with the plugins slug!).


http://wordpress.org/support/rss/tags/plugin_slug

http://plugins.trac.wordpress.org/log/plugin_slug?limit=100&#38;mode=stop_on_copy&#38;format=rss

The first of these contains all the support forum posts relevant [...]]]></description>
			<content:encoded><![CDATA[<p>Keeping track of a projects progress is a common desire and if the project you are interested in happens to be a WordPress plugin then there are a number of RSS feeds which are an important resource for you (replace <code>plugin_slug</code> with the plugins slug!).</p>
<pre class="brush: plain;">

http://wordpress.org/support/rss/tags/plugin_slug

http://plugins.trac.wordpress.org/log/plugin_slug?limit=100&amp;mode=stop_on_copy&amp;format=rss
</pre>
<p>The first of these contains all the support forum posts relevant to a particular plugin and the second is all the code changes that are happening in the plugins repository.</p>
<p>To keep track of these you have a couple of choices.</p>
<p>Firstly you could subscribe to them in your feed reader or if like me you like to receive emails for this sort of thing you can setup a cool tool called <a href="http://rss2email.infogami.com/" onclick="pageTracker._trackPageview('/outgoing/rss2email.infogami.com/?referer=');">rss2email</a> on your pc/server to email you new posts/changes.</p>
<img src="http://blog.ftwr.co.uk/9538f80a/266bbf5f/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2009/09/10/feeding-on-feedback-and-progress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Netflix Culture</title>
		<link>http://blog.ftwr.co.uk/archives/2009/08/05/netflix-culture/</link>
		<comments>http://blog.ftwr.co.uk/archives/2009/08/05/netflix-culture/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 20:42:47 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[Useful Links]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=339</guid>
		<description><![CDATA[A very interesting read on the culture of Netflix &#8211; something for all businesses to aspire to?
]]></description>
			<content:encoded><![CDATA[<p>A very interesting read on the <a href="http://www.slideshare.net/reed2001/culture-1798664" onclick="pageTracker._trackPageview('/outgoing/www.slideshare.net/reed2001/culture-1798664?referer=');">culture of Netflix</a> &#8211; something for all businesses to aspire to?</p>
<img src="http://blog.ftwr.co.uk/9538f80a/266bbf5f/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2009/08/05/netflix-culture/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A better meta API for WordPress</title>
		<link>http://blog.ftwr.co.uk/archives/2009/07/23/a-better-meta-api-for-wordpress/</link>
		<comments>http://blog.ftwr.co.uk/archives/2009/07/23/a-better-meta-api-for-wordpress/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 20:46:38 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[comment-meta]]></category>
		<category><![CDATA[meta-meta]]></category>
		<category><![CDATA[wordcampuk]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=334</guid>
		<description><![CDATA[One of the things that we have being discussing for a very long time is extending WordPress with a comment meta api or even the idea of a generic meta api for WordPress and indeed this is something we are discussing at the moment and I thought I would jot down some thoughts on what [...]]]></description>
			<content:encoded><![CDATA[<p>One of the things that we have being discussing for a very long time is extending WordPress with a <a href="http://core.trac.wordpress.org/ticket/2659" onclick="pageTracker._trackPageview('/outgoing/core.trac.wordpress.org/ticket/2659?referer=');">comment meta api</a> or even the idea of a <a href="http://core.trac.wordpress.org/ticket/5183" onclick="pageTracker._trackPageview('/outgoing/core.trac.wordpress.org/ticket/5183?referer=');">generic meta api</a> for WordPress and indeed this is something we are discussing at the moment and I thought I would jot down some thoughts on what I would like to see from an API point of view.  Over the weekend at <a href="http://wordcamp.org.uk/en/" onclick="pageTracker._trackPageview('/outgoing/wordcamp.org.uk/en/?referer=');">WordCamp UK</a> we also heard about situations where <a href="http://zed1.com/journalized/" onclick="pageTracker._trackPageview('/outgoing/zed1.com/journalized/?referer=');">some people</a> are already adding comment meta tables for plugin usage and so the demand is definitely there.</p>
<p>I don&#8217;t really care how the data is stored, be it single table or multi table, all I care about is having a good stable API for plugins and the core to work with.  If the API is good and well thought out they don&#8217;t need to care about the table structure and we can always change it later.</p>
<p>Therefore I thought I would summarise the features I would like to see in a generic meta api:</p>
<ul>
<li>Flexibility to easily create a different kind of meta without having to care about adding tables yourself.</li>
<li>Ability to store anything in a meta value &#8211; i.e. The same kind of functionality we have we options.</li>
<li>Ability to get things back based on key ranges or operations &#8211; i.e. Getting all cron meta values where the meta key (which would be a timestamp) is before a particular time.</li>
</ul>
<p>So I am thinking of an api like this:</p>
<pre class="brush: php;">
/*
* Register a new meta type.
* If we have a table per meta this will create the table for you if required
*/
register_meta_type('cron');

/*
* Returns the meta value for a particular key
*/
get_meta_value('cron', $key);

/*
* Sets the meta value for a particular key
*/
set_meta_value('cron', $key, $value);

/*
* Returns the meta values for a particular key based search
*/
get_meta_values('cron', $search_value, $search_type);

/*
* Deletes the meta value for a particular key
*/
delete_meta_value('cron', $key);
</pre>
<p>I would envisage us enabling the use of the new api with wrapper functions for different meta types as required.  These wrapper functions would only be included if required, for example we could create a comment_meta wrapper api around these generic meta api functions which would only be available if a plugin / theme called <code>enable_comment_meta_api()</code></p>
<img src="http://blog.ftwr.co.uk/9538f80a/266bbf5f/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2009/07/23/a-better-meta-api-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Adding extra user meta fields</title>
		<link>http://blog.ftwr.co.uk/archives/2009/07/19/adding-extra-user-meta-fields/</link>
		<comments>http://blog.ftwr.co.uk/archives/2009/07/19/adding-extra-user-meta-fields/#comments</comments>
		<pubDate>Sun, 19 Jul 2009 10:36:08 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[usermeta]]></category>
		<category><![CDATA[wordcampuk]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=326</guid>
		<description><![CDATA[Last night there was a discussion as to what could be achieved today as part of a &#8220;WordHack&#8221; session at WordCamp UK and SimonD tweeted that he would like to be able to add extra user meta fields to the back end user profile page easily.
I tweeted back that it was already easy and so [...]]]></description>
			<content:encoded><![CDATA[<p>Last night there was a discussion as to what could be achieved today as part of a &#8220;WordHack&#8221; session at WordCamp UK and <a href="http://puffbox.com/" onclick="pageTracker._trackPageview('/outgoing/puffbox.com/?referer=');">SimonD</a> <a href="http://twitter.com/simond/status/2709174222" onclick="pageTracker._trackPageview('/outgoing/twitter.com/simond/status/2709174222?referer=');">tweeted</a> that he would like to be able to add extra user meta fields to the back end user profile page easily.</p>
<p>I <a href="http://twitter.com/westi/status/2709191213" onclick="pageTracker._trackPageview('/outgoing/twitter.com/westi/status/2709191213?referer=');">tweeted</a> back that it was already easy and so here is the proof of concept code which shows you:</p>
<ul>
<li>How to add a user meta field to the page</li>
<li>How to process the new value when it is updated.</li>
</ul>
<p>These can the been displayed on the front-end using the standard template tags <code>get_the_author_meta()</code> and <code>the_author_meta()</code></p>
<pre class="brush: php;">

&lt;?php
/*
Plugin Name: PJW User Meta
Plugin URI: http://blog.ftwr.co.uk/archives/2009/07/19/adding-extra-user-meta-fields
Description: Allows users to configure some random extra meta value.
Author: Peter Westwood
Version: 0.02
Author URI: http://blog.ftwr.co.uk/

Use of the frontend as get_the_author_meta('something') or the_author_meta('something')
*/

class pjw_user_meta {

 function pjw_user_meta() {
 if ( is_admin() )
 {
 add_action('show_user_profile', array(&amp;$this,'action_show_user_profile'));
 add_action('edit_user_profile', array(&amp;$this,'action_show_user_profile'));
 add_action('personal_options_update', array(&amp;$this,'action_process_option_update'));
 add_action('edit_user_profile_update', array(&amp;$this,'action_process_option_update'));
 }

 }

 function action_show_user_profile($user)
 {
 ?&gt;
 &lt;h3&gt;&lt;?php _e('Other Contact Info') ?&gt;&lt;/h3&gt;

 &lt;table&gt;
 &lt;tr&gt;
 &lt;th&gt;&lt;label for=&quot;something&quot;&gt;&lt;?php _e('Something else'); ?&gt;&lt;/label&gt;&lt;/th&gt;
 &lt;td&gt;&lt;input type=&quot;text&quot; name=&quot;something&quot; id=&quot;something&quot; value=&quot;&lt;?php echo esc_attr(get_the_author_meta('something', $user-&gt;ID) ); ?&gt;&quot; /&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/table&gt;
 &lt;?php
 }

 function action_process_option_update($user_id)
 {
 update_usermeta($user_id, 'something', ( isset($_POST['something']) ? $_POST['something'] : '' ) );
 }
}
/* Initialise outselves */
add_action('plugins_loaded', create_function('','global $pjw_user_meta_instance; $pjw_user_meta_instance = new pjw_user_meta();'));
?&gt;
</pre>
<p>Enjoy!</p>
<p><ins datetime="2009-11-27T19:41:15+00:00">Updated to correctly use the <code>$user/$user_id</code> passed to the actions rather than the <code>global $user_id</code></ins></p>
<img src="http://blog.ftwr.co.uk/9538f80a/266bbf5f/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2009/07/19/adding-extra-user-meta-fields/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Retiring WordPress version check</title>
		<link>http://blog.ftwr.co.uk/archives/2009/05/26/retiring-wordpress-version-check/</link>
		<comments>http://blog.ftwr.co.uk/archives/2009/05/26/retiring-wordpress-version-check/#comments</comments>
		<pubDate>Tue, 26 May 2009 21:30:14 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=320</guid>
		<description><![CDATA[I was reminiscing today on what the world was like when I released my WordPress version check plugin back in 2005.
What a different world it was, upgrading WordPress took time and people just didn&#8217;t bother even though new versions which contain security fixes had been released.
Now we are just about to get WordPress 2.8, people [...]]]></description>
			<content:encoded><![CDATA[<p>I was reminiscing today on what the world was like when I released my <a href="http://blog.ftwr.co.uk/archives/2005/06/27/wordpress-version-check/">WordPress version check plugin back in 2005</a>.</p>
<p>What a different world it was, upgrading WordPress took time and people just didn&#8217;t bother even though new versions which contain security fixes had been released.</p>
<p>Now we are just about to get WordPress 2.8, people can upgrade with the click of a button and there hasn&#8217;t needed to be a security release for WordPress 2.7 how things change.</p>
<p>In celebration of this I have decided to take down the web-service which supported the plugin and have started the shutdown process by changing the message returned to point to this blog post.  So please un-install the plugin and rely on the notification that has been built in to WordPress for a few releases now.</p>
<p>Oh and don&#8217;t forget if your one of those people who has been ignoring these messages and are still running v1.5.2 (yes you know who you are) then please <a href="http://wordpress.org/download/" onclick="pageTracker._trackPageview('/outgoing/wordpress.org/download/?referer=');">upgrade</a>.</p>
<img src="http://blog.ftwr.co.uk/9538f80a/266bbf5f/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2009/05/26/retiring-wordpress-version-check/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Searching for Children and Grandchildren</title>
		<link>http://blog.ftwr.co.uk/archives/2009/05/26/searching-for-children-and-grandchildren/</link>
		<comments>http://blog.ftwr.co.uk/archives/2009/05/26/searching-for-children-and-grandchildren/#comments</comments>
		<pubDate>Tue, 26 May 2009 21:04:55 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[pjw-query-child]]></category>
		<category><![CDATA[query_post]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=310</guid>
		<description><![CDATA[I had a request recently for help on using my Query Child Of plugin to create a page template to show the grandchildren of a page as well as a number of people asking for better examples on how to use my plugin in general to just list the children of a page.
I am now [...]]]></description>
			<content:encoded><![CDATA[<p>I had a request recently for help on using my <a href="http://blog.ftwr.co.uk/wordpress/query_child/">Query Child Of</a> plugin to create a page template to show the grandchildren of a page as well as a number of people asking for better examples on how to use my plugin in general to just list the children of a page.</p>
<p>I am now happy to announce that I can provide these examples and have updated the plugin documentation on in the WordPress plugin directory to match as well.</p>
<p><span id="more-310"></span>Firstly we have an example page template (based on the default theme) for listing the children of a page:</p>
<pre class="brush: php;">

&lt;?php
/*
Template Name: Page with Children
*/
get_header(); ?&gt;

&lt;div id=&quot;content&quot; role=&quot;main&quot;&gt;

&lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;
&lt;div id=&quot;post-&lt;?php the_ID(); ?&gt;&quot;&gt;
&lt;h2&gt;&lt;?php the_title(); ?&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;?php the_content('&lt;p&gt;Read the rest of this page &amp;raquo;&lt;/p&gt;'); ?&gt;

&lt;?php wp_link_pages(array('before' =&gt; '&lt;p&gt;&lt;strong&gt;Pages:&lt;/strong&gt; ', 'after' =&gt; '&lt;/p&gt;', 'next_or_number' =&gt; 'number')); ?&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;?php endwhile; endif; ?&gt;
&lt;?php edit_post_link('Edit this entry.', '&lt;p&gt;', '&lt;/p&gt;'); ?&gt;
&lt;div id=&quot;children&quot;&gt;
&lt;dl&gt;
&lt;?php query_posts('static=true&amp;posts_per_page=-1&amp;child_of='.$id.'&amp;order=ASC'); ?&gt;
&lt;?php if(have_posts()) : while (have_posts()) : the_post(); ?&gt;
&lt;dt&gt;&lt;a href=&quot;&lt;?php the_permalink();?&gt;&quot;&gt;&lt;?php the_title();?&gt;:&lt;/a&gt;&lt;/dt&gt;
&lt;dd style=&quot;&quot;&gt;&lt;em&gt;&lt;?php the_excerpt(); ?&gt;&lt;/em&gt;&lt;/dd&gt;
&lt;?php endwhile; endif; ?&gt;
&lt;/dl&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;?php get_sidebar(); ?&gt;

&lt;?php get_footer(); ?&gt;
</pre>
<p>Next we have an example page template, again based on the default theme, for listing grandchildren:</p>
<pre class="brush: php;">

&lt;?php
/*
Template Name: Page with GrandChildren
*/
get_header(); ?&gt;

&lt;div id=&quot;content&quot; role=&quot;main&quot;&gt;

&lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;
&lt;div id=&quot;post-&lt;?php the_ID(); ?&gt;&quot;&gt;
&lt;h2&gt;&lt;?php the_title(); ?&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;?php the_content('&lt;p&gt;Read the rest of this page &amp;raquo;&lt;/p&gt;'); ?&gt;

&lt;?php wp_link_pages(array('before' =&gt; '&lt;p&gt;&lt;strong&gt;Pages:&lt;/strong&gt; ', 'after' =&gt; '&lt;/p&gt;', 'next_or_number' =&gt; 'number')); ?&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;?php endwhile; endif; ?&gt;
&lt;?php edit_post_link('Edit this entry.', '&lt;p&gt;', '&lt;/p&gt;'); ?&gt;
&lt;div id=&quot;children&quot;&gt;
&lt;dl&gt;
&lt;?php query_posts('static=true&amp;posts_per_page=-1&amp;child_of='.$id.'&amp;order=ASC'); ?&gt;
&lt;?php if(have_posts()) : while (have_posts()) : the_post(); ?&gt;
&lt;?php     $inner_query = new WP_Query(&quot;post_type=page&amp;posts_per_page=-1&amp;child_of={$id}&amp;order=ASC&quot;);
while ($inner_query-&gt;have_posts()) : $inner_query-&gt;the_post(); ?&gt;
&lt;dt&gt;&lt;a href=&quot;&lt;?php the_permalink();?&gt;&quot;&gt;&lt;?php the_title();?&gt;:&lt;/a&gt;&lt;/dt&gt;
&lt;dd style=&quot;&quot;&gt;&lt;em&gt;&lt;?php the_excerpt(); ?&gt;&lt;/em&gt;&lt;/dd&gt;
&lt;?php endwhile; endwhile; endif; ?&gt;
&lt;/dl&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;?php get_sidebar(); ?&gt;

&lt;?php get_footer(); ?&gt;
</pre>
<p>Hopefully these examples are illuminating!</p>
<img src="http://blog.ftwr.co.uk/9538f80a/266bbf5f/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2009/05/26/searching-for-children-and-grandchildren/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Howto: Backup your iPhone on another machine</title>
		<link>http://blog.ftwr.co.uk/archives/2009/05/25/howto-backup-your-iphone-on-another-machine/</link>
		<comments>http://blog.ftwr.co.uk/archives/2009/05/25/howto-backup-your-iphone-on-another-machine/#comments</comments>
		<pubDate>Mon, 25 May 2009 17:33:23 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=305</guid>
		<description><![CDATA[Jane asked -
&#8220;I&#8217;m nowhere near my iMac, and won&#8217;t be for weeks. I need to backup my iPhone onto my MacBook Pro or external hard drive today. How?!&#8221;
To which the answer is, suprisingly, use iTunes.
It turns out that once you have connected your iPhones to iTunes on another Mac you can just right click on [...]]]></description>
			<content:encoded><![CDATA[<p>Jane <a href="http://twitter.com/janeforshort/status/1913289495" onclick="pageTracker._trackPageview('/outgoing/twitter.com/janeforshort/status/1913289495?referer=');">asked</a> -</p>
<blockquote><p>&#8220;I&#8217;m nowhere near my iMac, and won&#8217;t be for weeks. I need to backup my iPhone onto my MacBook Pro or external hard drive today. How?!&#8221;</p></blockquote>
<p>To which the answer is, suprisingly, use iTunes.</p>
<p>It turns out that once you have connected your iPhones to iTunes on another Mac you can just right click on the device and select backup like so:</p>
<p><img class="aligncenter size-full wp-image-306" title="backup-iphone" src="http://blog.ftwr.co.uk/wp-content/uploads/2009/05/backup-iphone.png" alt="backup-iphone" width="312" height="164" /></p>
<p>Hopefully this will help other people in a similar situation in the future.</p>
<img src="http://blog.ftwr.co.uk/9538f80a/266bbf5f/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2009/05/25/howto-backup-your-iphone-on-another-machine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reaching a personal WordPress milestone</title>
		<link>http://blog.ftwr.co.uk/archives/2009/05/11/reaching-a-personal-wordpress-milestone/</link>
		<comments>http://blog.ftwr.co.uk/archives/2009/05/11/reaching-a-personal-wordpress-milestone/#comments</comments>
		<pubDate>Mon, 11 May 2009 19:19:10 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[milestone]]></category>
		<category><![CDATA[ohloh]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=302</guid>
		<description><![CDATA[Just went to check my ohloh stats today to find I have reached a milestone in my work as a WordPress lead developer.
According to there counts I have made 500 commits to the trunk section on the WordPress subversion repository.

]]></description>
			<content:encoded><![CDATA[<p>Just went to check my <a href="https://www.ohloh.net/accounts/westi" onclick="pageTracker._trackPageview('/outgoing/www.ohloh.net/accounts/westi?referer=');">ohloh stats</a> today to find I have reached a milestone in my work as a WordPress lead developer.</p>
<p>According to there counts I have made 500 commits to the trunk section on the WordPress subversion repository.</p>
<p><img class="aligncenter size-full wp-image-303" title="500-wordpress-commits" src="http://blog.ftwr.co.uk/wp-content/uploads/2009/05/500-wordpress-commits.png" alt="500-wordpress-commits" width="406" height="135" /></p>
<img src="http://blog.ftwr.co.uk/9538f80a/266bbf5f/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2009/05/11/reaching-a-personal-wordpress-milestone/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Solving confusing ssh problems</title>
		<link>http://blog.ftwr.co.uk/archives/2009/05/09/solving-confusing-ssh-problems/</link>
		<comments>http://blog.ftwr.co.uk/archives/2009/05/09/solving-confusing-ssh-problems/#comments</comments>
		<pubDate>Sat, 09 May 2009 07:37:42 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[Time Capsule]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=300</guid>
		<description><![CDATA[Last night I was setting up my new Time Capsule and suddenly lost access to all my remote servers over ssh.
All I got was the following error upon connection &#8217;ssh_exchange_identification: Connection closed by remote host&#8221; and everything I searched around the web implied this was to do with too many connections to the server or [...]]]></description>
			<content:encoded><![CDATA[<p>Last night I was setting up my new <a href="http://www.amazon.co.uk/gp/product/B00132B0MG?ie=UTF8&amp;tag=peterwestwood-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=B00132B0MG" onclick="pageTracker._trackPageview('/outgoing/www.amazon.co.uk/gp/product/B00132B0MG?ie=UTF8_amp_tag=peterwestwood-21_amp_linkCode=as2_amp_camp=1634_amp_creative=19450_amp_creativeASIN=B00132B0MG&amp;referer=');">Time Capsule</a> and suddenly lost access to all my remote servers over ssh.</p>
<p>All I got was the following error upon connection &#8217;ssh_exchange_identification: Connection closed by remote host&#8221; and everything I searched around the web implied this was to do with too many connections to the server or incorrect reverse dns setup.</p>
<p>Neither or these issues applied to me and for a while I was stumped until it dawned on me that the Time Capsule had a much better NAT implementation it in with specific handlers for different protocols and I have all my servers configured to accepting incoming ssh connections on a non-standard port so as to reduce the number of ssh probe attacks.  Once I opened up a different port that isn&#8217;t used for other protocols by default it all burst back into life.</p>
<p>Hopefully, this will help someone who encounters the same problem in the future!</p>
<img src="http://blog.ftwr.co.uk/9538f80a/266bbf5f/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2009/05/09/solving-confusing-ssh-problems/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Blog Minder</title>
		<link>http://blog.ftwr.co.uk/archives/2009/04/09/blog-minder/</link>
		<comments>http://blog.ftwr.co.uk/archives/2009/04/09/blog-minder/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 10:19:36 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[blogminder]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=292</guid>
		<description><![CDATA[Yesterday I put the finishing touches to my new Blog Minder plugin.
This plugin will remind you if you have not posted something new on your blog recently enough based on a threshold you set on a per-user basis.

Ideal for making sure a site keeps getting updated with fresh content on a regular basis.
Hopefully it is [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I put the finishing touches to my new <a href="http://wordpress.org/extend/plugins/pjw-blogminder/" onclick="pageTracker._trackPageview('/outgoing/wordpress.org/extend/plugins/pjw-blogminder/?referer=');">Blog Minder</a> plugin.</p>
<p>This plugin will remind you if you have not posted something new on your blog recently enough based on a threshold you set on a per-user basis.</p>
<p><img class="aligncenter size-full wp-image-295" title="blog-minder" src="http://blog.ftwr.co.uk/wp-content/uploads/2009/04/blog-minder.png" alt="blog-minder" width="641" height="43" /></p>
<p>Ideal for making sure a site keeps getting updated with fresh content on a regular basis.</p>
<p>Hopefully it is going to make me post more often here too!</p>
<img src="http://blog.ftwr.co.uk/9538f80a/266bbf5f/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2009/04/09/blog-minder/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
