<?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 &#187; Development</title>
	<atom:link href="http://blog.ftwr.co.uk/categorias/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ftwr.co.uk</link>
	<description>Random commentary...</description>
	<lastBuildDate>Thu, 09 Sep 2010 21:11:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>Switching from Manual to Automattic</title>
		<link>http://blog.ftwr.co.uk/archives/2010/08/23/switching-from-manual-to-automattic/</link>
		<comments>http://blog.ftwr.co.uk/archives/2010/08/23/switching-from-manual-to-automattic/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 21:24:54 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[automattic]]></category>
		<category><![CDATA[dotcom]]></category>
		<category><![CDATA[dotorg]]></category>
		<category><![CDATA[happiness]]></category>
		<category><![CDATA[job]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=456</guid>
		<description><![CDATA[Over the past few years I have been an active member of the WordPress.org community in my spare time whilst having a day job which was completely unrelated to WordPress.  I have found it a useful learning experience, gaining knowledge from all the smart people we have in the community and have also found it [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past few years I have been an active member of the WordPress.org community in my spare time whilst having a day job which was completely unrelated to WordPress.  I have found it a useful learning experience, gaining knowledge from all the smart people we have in the community and have also found it rewarding to help people realise their full potential.</p>
<p>This level of enjoyment has led me to consider at a number of points in time whether or not I should switch job and work full-time on WordPress.org as a freelance consultant or as an Automattician.  In the end it felt like the right thing for me to do was to apply to be an Automattician.  This will hopefully ensure that I have a dependable long-term income stream and the ability to spend my spare time on the things I love: Music, Photography, Food, and of course WordPress.</p>
<p>It is with great pleasure that I am therefore able to reveal that I will soon be switching and starting a full-time job working for Automattic as a &#8220;Happiness Gardener&#8221;.</p>
<p>So what does this mean, I hear you cry?  Well to me it means a number of things:</p>
<p>First of all I will be getting to work with the fantastic team at Automattic on a daily basis and helping the Happiness Engineers to improve the tools they have, and the experience bloggers have, by working to remove some of the issues which are a frequent source of support tickets.</p>
<p>Secondly this means that I will have an easier time structuring my work around contributing to the core of WordPress.org.  In the short-term my availability to work on WordPress.org may be reduced solely because there are a lot of things the Happiness Engineers would like me to do to make it easier for them to ensure that all of the bloggers on WordPress.com are as happy as they could be.  In the long-term I hope to be able to spend some of my work time working on WordPress.org and helping Automattic give back to the community even more than it already does.</p>
<p>Thirdly it means that I might be able to attend a few more WordCamps in order to listen to community feedback in person and answer questions on both WordPress.org and WordPress.com.  I am certainly not going to stop listening to the feedback from the community at large or focus my WordPress.org contributions on things which Automattic want to be done.  I think one of the most positive things about WordPress.org is that it is a meritocracy and everyone can play a part, my new job will not change my attitude or contributions.  I want the WordPress.org community to continue to grow organically as it has over the past years, and together we can all ensure that WordPress.org continues to be the simplest and most beautiful open-source online publishing platform.</p>
<img src="http://blog.ftwr.co.uk/9538f80a/266bbf65/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2010/08/23/switching-from-manual-to-automattic/feed/</wfw:commentRss>
		<slash:comments>22</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 [...]]]></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/266bbf65/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>12</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 [...]]]></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/266bbf65/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>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/266bbf65/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 [...]]]></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/266bbf65/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>22</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 [...]]]></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/266bbf65/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 [...]]]></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/266bbf65/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>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/266bbf65/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>Updated child queries, now with limits!</title>
		<link>http://blog.ftwr.co.uk/archives/2009/03/20/updated-child-queries-now-with-limits/</link>
		<comments>http://blog.ftwr.co.uk/archives/2009/03/20/updated-child-queries-now-with-limits/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 20:09:56 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[pjw-query-child]]></category>
		<category><![CDATA[query_posts]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=284</guid>
		<description><![CDATA[By popular request I have updated my Query Child Of plugin to support limiting the number of child pages returned (and to support the ability for this limit to be offset). The plugin is also now hosted on WordPress.org Extend as PJW Query Child Of and I have also writen up some example php code [...]]]></description>
			<content:encoded><![CDATA[<p>By popular request I have updated my <a href="http://blog.ftwr.co.uk/wordpress/query-child-of-page/">Query Child Of</a> plugin to support limiting the number of child pages returned (and to support the ability for this limit to be offset).</p>
<p>The plugin is also now hosted on WordPress.org Extend as <a href="http://wordpress.org/extend/plugins/pjw-query-child-of/" onclick="pageTracker._trackPageview('/outgoing/wordpress.org/extend/plugins/pjw-query-child-of/?referer=');">PJW Query Child Of</a> and I have also writen up some example php code so as to make it really easy to use!</p>
<img src="http://blog.ftwr.co.uk/9538f80a/266bbf65/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2009/03/20/updated-child-queries-now-with-limits/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thought for the day</title>
		<link>http://blog.ftwr.co.uk/archives/2009/03/01/thought-for-the-day/</link>
		<comments>http://blog.ftwr.co.uk/archives/2009/03/01/thought-for-the-day/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 22:28:40 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[GPL]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=275</guid>
		<description><![CDATA[&#8220;If you want to make money in the open-source world then you need to think of the code you give away for free, and the community interaction you make as an on-going job interview.&#8221;]]></description>
			<content:encoded><![CDATA[<p>&#8220;If you want to make money in the open-source world then you need to think of the code you give away for free, and the community interaction you make as an on-going job interview.&#8221;</p>
<img src="http://blog.ftwr.co.uk/9538f80a/266bbf65/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2009/03/01/thought-for-the-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Documentation links</title>
		<link>http://blog.ftwr.co.uk/archives/2009/02/19/documentation-links/</link>
		<comments>http://blog.ftwr.co.uk/archives/2009/02/19/documentation-links/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 22:37:14 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=272</guid>
		<description><![CDATA[During a discussion on #wordpress-dev this evening I came up with the following oneliner for generating links to phpdocumenter output based on function name to support a php.net like lookup solutions: curl &#34;http://phpdoc.wordpress.org/trunk/li_WordPress.html&#34; &#124; grep &#34;wp_list_pages&#34; &#124; sed &#34;s/^.*'\(.*\)'.*'.*'.*$/http:\/\/phpdoc.wordpress.org\/trunk\/\1/&#34; It needs some optimisation though.  It&#8217;s too long to tweet!]]></description>
			<content:encoded><![CDATA[<p>During a discussion on #wordpress-dev this evening I came up with the following oneliner for generating links to phpdocumenter output based on function name to support a php.net like lookup solutions:</p>
<pre class="brush: jscript;">

curl &quot;http://phpdoc.wordpress.org/trunk/li_WordPress.html&quot; | grep &quot;wp_list_pages&quot; | sed &quot;s/^.*'\(.*\)'.*'.*'.*$/http:\/\/phpdoc.wordpress.org\/trunk\/\1/&quot;
</pre>
<p>It needs some optimisation though.  It&#8217;s too long to tweet!</p>
<img src="http://blog.ftwr.co.uk/9538f80a/266bbf65/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2009/02/19/documentation-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Responsible security releases</title>
		<link>http://blog.ftwr.co.uk/archives/2008/10/18/responsible-security-releases/</link>
		<comments>http://blog.ftwr.co.uk/archives/2008/10/18/responsible-security-releases/#comments</comments>
		<pubDate>Sat, 18 Oct 2008 12:23:34 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web dev]]></category>
		<category><![CDATA[habari]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=250</guid>
		<description><![CDATA[It&#8217;s great to see that the habari guys are committed to security as well as functionality and are providing security updates for there pre-1.0 software.  It is a pity to see that they don&#8217;t disclose much in there security announcements. For me, responsible open security practises should mean that as well as providing a quick [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s great to see that the habari guys are committed to security as well as functionality and are providing <a href="http://habariproject.org/en/habari-version-0-5-2" onclick="pageTracker._trackPageview('/outgoing/habariproject.org/en/habari-version-0-5-2?referer=');">security updates</a> for there pre-1.0 software.  It is a pity to see that they don&#8217;t disclose much in there security announcements.</p>
<p>For me, responsible open security practises should mean that as well as providing a quick response to security issues you provide enough detail about the issue to your users to allow them to make a judgement call about how important the upgrade is to them.  Do they need to do the upgrade immediately because the issue is easy to exploit or can it wait till the weekend when they have more time to ensure they have a backup and a plan for when the upgrade goes wrong.<br />
<span id="more-250"></span><br />
The WordPress project tries to provide this information and we provide clear security release announcements on the development blog which is syndicated into everyones dashboard.  The habari project however seems to be happy with a release announcement which basically says &#8211; &#8220;<em>Hey, you blog is vulnerable to some critical security issue but we fixed it for you upgrade now!</em>&#8220;.</p>
<p>For example in the <a href="http://wordpress.org/development/2008/09/wordpress-262/" onclick="pageTracker._trackPageview('/outgoing/wordpress.org/development/2008/09/wordpress-262/?referer=');">WordPress 2.6.2 announcement</a> we have:</p>
<blockquote cite="http://wordpress.org/development/2008/09/wordpress-262/"><p><a href="http://www.suspekt.org/" onclick="pageTracker._trackPageview('/outgoing/www.suspekt.org/?referer=');">Stefan Esser</a> recently warned developers of the dangers of <a href="http://www.suspekt.org/2008/08/18/mysql-and-sql-column-truncation-vulnerabilities/" onclick="pageTracker._trackPageview('/outgoing/www.suspekt.org/2008/08/18/mysql-and-sql-column-truncation-vulnerabilities/?referer=');">SQL Column Truncation</a> and the <a href="http://www.suspekt.org/2008/08/17/mt_srand-and-not-so-random-numbers/" onclick="pageTracker._trackPageview('/outgoing/www.suspekt.org/2008/08/17/mt_srand-and-not-so-random-numbers/?referer=');">weakness of mt_rand()</a>.  With his help we worked around these problems and are now releasing WordPress 2.6.2.  If you allow open registration on your blog, you should definitely upgrade.  With open registration enabled, it is possible in WordPress versions 2.6.1 and earlier to craft a username such that it will allow resetting another user’s password to a randomly generated password.  The randomly generated password is not disclosed to the attacker, so this problem by itself is annoying but not a security exploit.  However, this attack coupled with a weakness in the random number seeding in mt_rand() could be used to predict the randomly generated password.  Stefan Esser will release details of the complete attack shortly.  The attack is difficult to accomplish,  but its mere possibility means we recommend upgrading to 2.6.2.</p></blockquote>
<p>Comparing this to the recent habari annoucement:</p>
<blockquote>
<div class="entry-content">
<p>The Habari Community announces the release of <a href="http://habariproject.org/en/download" onclick="pageTracker._trackPageview('/outgoing/habariproject.org/en/download?referer=');">version 0.5.2</a>. This version is a critical security update; all users of any version prior to 0.5.2 should upgrade at once. Additionally users of HEAD should also update to the latest revision.</p>
<p>Thanks are due to the entire community for identifying and patching this bug in a timely manner.</p></div>
</blockquote>
<p>This isn&#8217;t very detailed and leaves me wondering &#8211; What was the issue? How serious was it? Is the issue such a bad example of security aware development that they don&#8217;t want to highlight how wrong they got things?</p>
<p>Don&#8217;t get me wrong, I am please that security matters for the habari project and I know the difficulties involved in developing secure software, I just feel that you need to be open with your issues to build trust with your users.</p>
<p><strong>Update:  There is now a much clearer release announcement for habari v0.5.2.</strong></p>
<img src="http://blog.ftwr.co.uk/9538f80a/266bbf65/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2008/10/18/responsible-security-releases/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WordPress source cross-reference</title>
		<link>http://blog.ftwr.co.uk/archives/2008/09/28/wordpress-source-cross-reference/</link>
		<comments>http://blog.ftwr.co.uk/archives/2008/09/28/wordpress-source-cross-reference/#comments</comments>
		<pubDate>Sun, 28 Sep 2008 10:43:17 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[backpress]]></category>
		<category><![CDATA[bbpress]]></category>
		<category><![CDATA[phpxref]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=247</guid>
		<description><![CDATA[Following on from the WordPress developer documentation.  This morning I have restored my WordPress phpxref site into functionality and added bbPress and BackPress into the mix too.  The root of the site is http://phpxref.ftwr.co.uk/ and it is set to automattically update every 30 minutes as things change.]]></description>
			<content:encoded><![CDATA[<p>Following on from the <a href="http://blog.ftwr.co.uk/archives/2008/09/25/wordpress-developer-documentation/">WordPress developer documentation</a>.  This morning I have restored my WordPress phpxref site into functionality and added bbPress and BackPress into the mix too.  The root of the site is <a href="http://phpxref.ftwr.co.uk/" onclick="pageTracker._trackPageview('/outgoing/phpxref.ftwr.co.uk/?referer=');">http://phpxref.ftwr.co.uk/</a> and it is set to automattically update every 30 minutes as things change.</p>
<img src="http://blog.ftwr.co.uk/9538f80a/266bbf65/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2008/09/28/wordpress-source-cross-reference/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WordPress developer documentation</title>
		<link>http://blog.ftwr.co.uk/archives/2008/09/25/wordpress-developer-documentation/</link>
		<comments>http://blog.ftwr.co.uk/archives/2008/09/25/wordpress-developer-documentation/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 21:39:08 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[backpress]]></category>
		<category><![CDATA[bbpress]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=244</guid>
		<description><![CDATA[Tonight I have restored my WordPress phpDocumentor site into functionality and added bbPress and BackPress into the mix too.  The root of the site is http://phpdoc.ftwr.co.uk/ and it is set to automattically update every 30 minutes as things change.]]></description>
			<content:encoded><![CDATA[<p>Tonight I have restored my WordPress phpDocumentor site into functionality and added bbPress and BackPress into the mix too.  The root of the site is <a href="http://phpdoc.ftwr.co.uk/" onclick="pageTracker._trackPageview('/outgoing/phpdoc.ftwr.co.uk/?referer=');">http://phpdoc.ftwr.co.uk/</a> and it is set to automattically update every 30 minutes as things change.</p>
<img src="http://blog.ftwr.co.uk/9538f80a/266bbf65/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2008/09/25/wordpress-developer-documentation/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Subversion integration for Finder</title>
		<link>http://blog.ftwr.co.uk/archives/2008/07/27/subversion-integration-for-finder/</link>
		<comments>http://blog.ftwr.co.uk/archives/2008/07/27/subversion-integration-for-finder/#comments</comments>
		<pubDate>Sun, 27 Jul 2008 19:17:54 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Useful Links]]></category>
		<category><![CDATA[scplugin]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=236</guid>
		<description><![CDATA[In order to answer a plea for help from a commandline phobe for an easy to use subversion client for OS X I went searching for a TortoiseSVN equivalent.  Tortoise is the subversion client for Windows so I hoped that someone would have developed something similar to integrate with Finder.  After a little bit of [...]]]></description>
			<content:encoded><![CDATA[<p>In order to answer a plea for help from a <a href="http://www.jonnya.net/" onclick="pageTracker._trackPageview('/outgoing/www.jonnya.net/?referer=');">commandline phobe</a> for an easy to use subversion client for OS X I went searching for a <a href="http://tortoisesvn.tigris.org/" onclick="pageTracker._trackPageview('/outgoing/tortoisesvn.tigris.org/?referer=');">TortoiseSVN</a> equivalent.  Tortoise is <em>the</em> subversion client for Windows so I hoped that someone would have developed something similar to integrate with Finder.  After a little bit of searching I found <a href="http://scplugin.tigris.org/" onclick="pageTracker._trackPageview('/outgoing/scplugin.tigris.org/?referer=');">scplugin</a> and recommended it.  I finally got a chance to try it out myself this evening and so far it looks really good.</p>
<img src="http://blog.ftwr.co.uk/9538f80a/266bbf65/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2008/07/27/subversion-integration-for-finder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
