<?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; WordPress</title>
	<atom:link href="http://blog.ftwr.co.uk/categorias/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ftwr.co.uk</link>
	<description>Random commentary...</description>
	<lastBuildDate>Sat, 21 Apr 2012 22:29:27 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-beta3-20644</generator>
		<item>
		<title>Scaling WordPress @ #wpldn</title>
		<link>http://blog.ftwr.co.uk/archives/2012/01/20/scaling-wordpress-wpldn/</link>
		<comments>http://blog.ftwr.co.uk/archives/2012/01/20/scaling-wordpress-wpldn/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 10:04:18 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[scalability]]></category>
		<category><![CDATA[wpldn]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=595</guid>
		<description><![CDATA[Last night I did a short presentation on Scaling WordPress using WordPress.com as an example giving an overview of the solutions we use for different scaling issues as well as highlighting some solutions that you can try out on smaller sites:]]></description>
			<content:encoded><![CDATA[<p>Last night I did a short presentation on Scaling WordPress using WordPress.com as an example giving an overview of the solutions we use for different scaling issues as well as highlighting some solutions that you can try out on smaller sites:</p>
<div style="width: 450px; margin-left: auto; margin-right: auto; padding:10px;"><iframe src="http://www.slideshare.net/slideshow/embed_code/11172307" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="425" height="355"></iframe></div>
<div style="width: 450px; margin-left: auto; margin-right: auto;"></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2012/01/20/scaling-wordpress-wpldn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My ethos for sharing code</title>
		<link>http://blog.ftwr.co.uk/archives/2011/12/08/my-ethos-for-sharing-code/</link>
		<comments>http://blog.ftwr.co.uk/archives/2011/12/08/my-ethos-for-sharing-code/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 09:11:08 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Rants]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[automattic]]></category>
		<category><![CDATA[ethos]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=581</guid>
		<description><![CDATA[A recent discussion around the way we write and share small helper scripts inside Automattic made me think a lot about why I do things the way I do and why I am against &#8220;authorship attribution&#8221; in shared code. The views I have are strong and I think a good guiding principle for working collaboratively [...]]]></description>
			<content:encoded><![CDATA[<p>A recent discussion around the way we write and share small helper scripts inside Automattic made me think a lot about why I do things the way I do and why I am against &#8220;authorship attribution&#8221; in shared code.</p>
<p>The views I have are strong and I think a good guiding principle for working collaboratively with your peers especially in Open Source projects:</p>
<blockquote><p>I am very strongly against authorship attribution – it puts up a barrier to contribution by setting a subconscious ownership barrier around things.</p>
<p>I give you my code to do as you wish, I mold your code to do as I wish, I blame early and often when searching for bugs, and I expect you to have forgotten you wrote the tool I’m asking you about especially if you committed it yesterday!</p></blockquote>
<p>What is your ethos and what do you think of mine?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2011/12/08/my-ethos-for-sharing-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Understanding complex RegEx</title>
		<link>http://blog.ftwr.co.uk/archives/2011/03/18/understanding-complex-regex/</link>
		<comments>http://blog.ftwr.co.uk/archives/2011/03/18/understanding-complex-regex/#comments</comments>
		<pubDate>Fri, 18 Mar 2011 11:29:01 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=528</guid>
		<description><![CDATA[I&#8217;ve been wondering for a while if there was a good way of reverse engineering the meaning/function from a complex Regular Expression pattern such as the one used in the make_clickable function in WordPress.  This morning while debugging an issue with this function causing occasional segfaults in php I started searching around for a suitable [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been wondering for a while if there was a good way of reverse engineering the meaning/function from a complex Regular Expression pattern such as the one used in the <code>make_clickable</code> function in WordPress.  This morning while debugging an issue with this function causing occasional segfaults in php I started searching around for a suitable tool and found <a href="http://search.cpan.org/dist/YAPE-Regex-Explain/" onclick="pageTracker._trackPageview('/outgoing/search.cpan.org/dist/YAPE-Regex-Explain/?referer=');">YAPE::Regex::Explain</a> to be the only reasonable solution.</p>
<p><span id="more-528"></span>So with trepidation I started installing modules from CPAN and converting an example script to take the RegEx using in <code>make_clickable</code>. I ended up with the following simple script:</p>
<pre class="brush: perl; title: ; notranslate">
use strict;
use warnings;
use YAPE::Regex::Explain;

my $re = qr/(?&lt;!--=[\'&quot;])(?&lt;=[*\')+.,;:!&amp;#038;\$\s--&gt;])(\()?([\w]+?:\/\/(?:[\w\\x80-\\xff#%~\/?@\[\]-]|[\'*(+.,;:!=&amp;\$](?![\b\)]|(\))?([\s]|$))|(?(1)
\)(?![\s&lt;.,;:]|$)|\)))+)/; print YAPE::Regex::Explain-&gt;new($re)-&gt;explain();
</pre>
<p>Which generated the following detailed output:</p>
<blockquote><p>The regular expression:</p>
<p>(?-imsx:(?&lt;!=[\'"])(?&lt;=[*\')+.,;:!&amp;\$\s&gt;])(\()?([\w]+?://(?:[\w\\x80-\\xff#%~/?@\[\]-]|[\'*(+.,;:!=&amp;\$](?![\b\)]|(\))?([\s]|$))|(?(1)\)(?![\s&lt;.,;:]|$)|\)))+))</p>
<p>matches as follows:</p>
<p>NODE                     EXPLANATION<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
(?-imsx:                 group, but do not capture (case-sensitive)<br />
(with ^ and $ matching normally) (with . not<br />
matching \n) (matching whitespace and #<br />
normally):<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
(?&lt;!                     look behind to see if there is not:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
=                        &#8216;=&#8217;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
[\'"]                    any character of: &#8216;\&#8221;, &#8216;&#8221;&#8216;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
)                        end of look-behind<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
(?&lt;=                     look behind to see if there is:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
[*\')+.,;:!&amp;\$\s&gt;]       any character of: &#8216;*&#8217;, &#8216;\&#8221;, &#8216;)&#8217;, &#8216;+&#8217;,<br />
&#8216;.&#8217;, &#8216;,&#8217;, &#8216;;&#8217;, &#8216;:&#8217;, &#8216;!&#8217;, &#8216;&amp;&#8217;, &#8216;\$&#8217;,<br />
whitespace (\n, \r, \t, \f, and &#8221; &#8220;),<br />
&#8216;&gt;&#8217;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
)                        end of look-behind<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
(                        group and capture to \1 (optional<br />
(matching the most amount possible)):<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
\(                       &#8216;(&#8216;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
)?                       end of \1 (NOTE: because you are using a<br />
quantifier on this capture, only the LAST<br />
repetition of the captured pattern will be<br />
stored in \1)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
(                        group and capture to \2:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
[\w]+?                   any character of: word characters (a-z,<br />
A-Z, 0-9, _) (1 or more times (matching<br />
the least amount possible))<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
://                      &#8216;://&#8217;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
(?:                      group, but do not capture (1 or more<br />
times (matching the most amount<br />
possible)):<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
[\w\\x80-                any character of: word characters (a-<br />
\\xff#%~/?@\[\]-         z, A-Z, 0-9, _), &#8216;\\&#8217;, &#8216;x&#8217;, &#8217;8&#8242;, &#8217;0&#8242;<br />
]                        to &#8216;\\&#8217;, &#8216;x&#8217;, &#8216;f&#8217;, &#8216;f&#8217;, &#8216;#&#8217;, &#8216;%&#8217;, &#8216;~&#8217;,<br />
&#8216;/&#8217;, &#8216;?&#8217;, &#8216;@&#8217;, &#8216;\[', '\]&#8216;, &#8216;-&#8217;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
|                        OR<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
[\'*(+.,;:!=&amp;\$]         any character of: &#8216;\&#8221;, &#8216;*&#8217;, &#8216;(&#8216;, &#8216;+&#8217;,<br />
&#8216;.&#8217;, &#8216;,&#8217;, &#8216;;&#8217;, &#8216;:&#8217;, &#8216;!&#8217;, &#8216;=&#8217;, &#8216;&amp;&#8217;,<br />
&#8216;\$&#8217;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
(?!                      look ahead to see if there is not:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
[\b\)]                   any character of: &#8216;\b&#8217; (backspace),<br />
&#8216;\)&#8217;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
|                        OR<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
(                        group and capture to \3 (optional<br />
(matching the most amount<br />
possible)):<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
\)                       &#8216;)&#8217;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
)?                       end of \3 (NOTE: because you are<br />
using a quantifier on this capture,<br />
only the LAST repetition of the<br />
captured pattern will be stored in<br />
\3)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
(                        group and capture to \4:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
[\s]                     any character of: whitespace (\n,<br />
\r, \t, \f, and &#8221; &#8220;)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
|                        OR<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
$                        before an optional \n, and the end<br />
of the string<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
)                        end of \4<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
)                        end of look-ahead<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
|                        OR<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
(?(1)                    if back-reference \1 matched, then:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
\)                       &#8216;)&#8217;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
(?!                      look ahead to see if there is not:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
[\s&lt;.,;:]                any character of: whitespace (\n,<br />
\r, \t, \f, and &#8221; &#8220;), &#8216;&lt;&#8217;, &#8216;.&#8217;,<br />
&#8216;,&#8217;, &#8216;;&#8217;, &#8216;:&#8217;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
|                        OR<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
$                        before an optional \n, and the end<br />
of the string<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
)                        end of look-ahead<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
|                        else:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
\)                       &#8216;)&#8217;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
)                        end of conditional on \1<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
)+                       end of grouping<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
)                        end of \2<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
)                        end of grouping<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2011/03/18/understanding-complex-regex/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Always show admin bar</title>
		<link>http://blog.ftwr.co.uk/archives/2011/01/05/always-show-admin-bar/</link>
		<comments>http://blog.ftwr.co.uk/archives/2011/01/05/always-show-admin-bar/#comments</comments>
		<pubDate>Wed, 05 Jan 2011 11:24:28 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[admin bar]]></category>
		<category><![CDATA[mu-plugin]]></category>
		<category><![CDATA[wp3.1]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=516</guid>
		<description><![CDATA[I like the admin bar that we are adding in the soon to be released WordPress 3.1 so much that I wanted it to always show on my site.  This way you get an easy to use search box on every page even when logged out. I wrote a quick plugin file which I dropped [...]]]></description>
			<content:encoded><![CDATA[<p>I like the admin bar that we are adding in the soon to be released WordPress 3.1 so much that I wanted it to always show on my site.  This way you get an easy to use search box on every page even when logged out.</p>
<p>I wrote a quick plugin file which I dropped into the <code>wp-content/mu-plugins</code> folder on this site. Here is the code I used in case you want to do the same:</p>
<pre class="brush: php; title: ; notranslate">

&lt;?php
function pjw_login_adminbar( $wp_admin_bar) {
 if ( !is_user_logged_in() )
 $wp_admin_bar-&gt;add_menu( array( 'title' =&gt; __( 'Log In' ), 'href' =&gt; wp_login_url() ) );
}
add_action( 'admin_bar_menu', 'pjw_login_adminbar' );
add_filter( 'show_admin_bar', '__return_true' , 1000 );

</pre>
<p>As you can see to make it even more useful I&#8217;ve added a Log In link so I can use it to log in to the site.</p>
<p><strong>As with anything else to do with the Admin bar this code requires WordPress 3.1 to work.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2011/01/05/always-show-admin-bar/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<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>
]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2010/08/23/switching-from-manual-to-automattic/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>WordPress Sussex and Surrey meetup group</title>
		<link>http://blog.ftwr.co.uk/archives/2010/07/28/wordpress-sussex-and-surrey-meetup-group/</link>
		<comments>http://blog.ftwr.co.uk/archives/2010/07/28/wordpress-sussex-and-surrey-meetup-group/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 17:29:26 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=430</guid>
		<description><![CDATA[As I mentioned in my previous post I&#8217;m thinking of starting a meetup group for all things WordPress in the Sussex and Surrey areas. I&#8217;m not sure of the exact format yet but I&#8217;m thinking if we start with small ambitions and try organise a monthly meetup for users and developers interested in WordPress and [...]]]></description>
			<content:encoded><![CDATA[<p>As I mentioned in my <a href="http://blog.ftwr.co.uk/archives/2010/07/19/thoughts-on-wordcampuk-2010/">previous post</a> I&#8217;m thinking of starting a meetup group for all things WordPress in the Sussex and Surrey areas.</p>
<p>I&#8217;m not sure of the exact format yet but I&#8217;m thinking if we start with small ambitions and try organise a monthly meetup for users and developers interested in WordPress and any of its sister projects.</p>
<p>I am thinking of organising something on a week night with the first meetup to happen in August and then try to arrange them to occur on a monthly basis.</p>
<p>So as I can get an idea of interested numbers and ideal locations please comment on this post if you would be interested in attending letting me know if there are any week nights you can&#8217;t do and with the area you would be travelling from so I can try to pick somewhere that is easily accessible to as many people as possible.</p>
<p>Once I&#8217;ve got a good idea of numbers and localities I will arrange the first meetup.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2010/07/28/wordpress-sussex-and-surrey-meetup-group/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>Thoughts on #wordcampuk 2010</title>
		<link>http://blog.ftwr.co.uk/archives/2010/07/19/thoughts-on-wordcampuk-2010/</link>
		<comments>http://blog.ftwr.co.uk/archives/2010/07/19/thoughts-on-wordcampuk-2010/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 20:59:52 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wordcamp]]></category>
		<category><![CDATA[wordcampuk]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=420</guid>
		<description><![CDATA[This past weekend was the 3rd WordCamp to be held in the UK and I had a great time both as a speaker and a participant.  It is great to see how the event has grown over the past 2 years from a small affair with around 50 attendees up to one with around 150. [...]]]></description>
			<content:encoded><![CDATA[<p>This past weekend was the 3rd WordCamp to be held in the UK and I had a great time both as a speaker and a participant.  It is great to see how the event has grown over the past 2 years from a small affair with around 50 attendees up to one with around 150.</p>
<p>I am really impressed with the way in which a disparate group of people have pulled together with little central coordination and pulled together a great event. However I do think that we need to sit back and reflect on where we have come from where we are going and what is going to serve the community at large.  The community of WordPress users and developers has grown at an astounding rate over the past few years and so has the number of WordCamps.</p>
<p>For me this years WordCamp had some great learning points for how we can do better &#8211; these come from things that have affected me directly and also feedback I have received from others.</p>
<ul>
<li>We need to get tickets on sale earlier &#8211; people like to organise their weekends and travel in advance</li>
<li>We need to organise the schedule better &#8211; having focused tracks for different audiences with a list of topics and presenters available in advance so that people can plan their schedule and know what they are going to find out.</li>
<li>We need to think about how we lay out the rooms &#8211; It was harder to get to know the other attendees this year because we were in front facing lecture theatre style layout rather than the Banquet/Cabaret style layout we&#8217;ve used in the past</li>
<li>We need to think about naming &#8211; WordCamps are big and small and I think that the UK community has reached the tipping point where it could support more than one some years. We could do more to emphasise that by thinking about the name and maybe name the next one after the City/Town/Region that it is held in to make it really obvious that other UK based WordCamps would be great.</li>
<li>I think we should try harder to organise some more regional groups to try an emulate the success that has been achieved in Manchester &#8211; I wonder how many people would be interested in a monthly WordPress Sussex meetup?  Let me know!</li>
<li>We need to think more about the social events &#8211; It was great to get to visit FAC251 but it really wasn&#8217;t the best venue for networking and talking to other WordPress users / developers &#8211; I would have much preferred a quieter venue where I could have actually talked to people and not felt like I was melting.</li>
<li>We need to consider focussing on a single kick-ass day of major sessions and the leaving the second day for more informal networking and BarCamp style lightning talks &#8211; this is a format that quite a few other WordCamps around the world are using with great success and ensures that there is lots of time for the spontaneous connections to be made.</li>
</ul>
<p>I know that some of these suggestions may seem controversial, and I&#8217;ve read about the wrap-up session that I missed, but we should remember that anyone in the community at large has the right to organise another WordCamp and if there are people in the UK that would like to organise other &#8220;competing&#8221; events I think we should try as hard as possible to support them in any way we can &#8211; we know how difficult it was to get the first event off the ground and have built an infrastructure of contacts and resources that they should be able to leverage to make it easier.</p>
<p>If you want to get involved in organising a WordCamp and want to find out more read on <a href="http://central.wordcamp.org/about/" onclick="pageTracker._trackPageview('/outgoing/central.wordcamp.org/about/?referer=');">here</a> and if you have any questions feel free to email me!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2010/07/19/thoughts-on-wordcampuk-2010/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t blame the Kitteh</title>
		<link>http://blog.ftwr.co.uk/archives/2010/04/23/dont-blame-the-kitteh/</link>
		<comments>http://blog.ftwr.co.uk/archives/2010/04/23/dont-blame-the-kitteh/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 06:44:34 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Photos]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[kitteh]]></category>
		<category><![CDATA[meme]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=396</guid>
		<description><![CDATA[During last nights WordPress dev chat we got distracted by the Kitteh.  Now we have a WordPress Kitteh meme &#8211; http://cheezburger.com/View/3444964352 My contribution:]]></description>
			<content:encoded><![CDATA[<p>During last nights <a href="http://wpdevel.wordpress.com/2010/04/22/live-blog-of-apr-22nd-2010-dev-chat/" onclick="pageTracker._trackPageview('/outgoing/wpdevel.wordpress.com/2010/04/22/live-blog-of-apr-22nd-2010-dev-chat/?referer=');">WordPress dev chat</a> we got distracted by the <a href="http://brizzly.com/pic/25SX" onclick="pageTracker._trackPageview('/outgoing/brizzly.com/pic/25SX?referer=');">Kitteh</a>.  Now we have a WordPress Kitteh meme &#8211; <a href="http://cheezburger.com/View/3444964352" onclick="pageTracker._trackPageview('/outgoing/cheezburger.com/View/3444964352?referer=');">http://cheezburger.com/View/3444964352</a></p>
<p>My contribution:</p>
<div class="wp-caption aligncenter" style="width: 510px"><a href="http://cheezburger.com/View/3446980864" onclick="pageTracker._trackPageview('/outgoing/cheezburger.com/View/3446980864?referer=');"><img title="Ok intarwebs, sawry, working on 3.0 now" src="http://images.cheezburger.com/completestore/2010/4/22/129164777472495202.jpg" alt="Ok intarwebs, sawry, working on 3.0 now" width="500" height="375" /></a><p class="wp-caption-text">Ok intarwebs, sawry, working on 3.0 now</p></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2010/04/23/dont-blame-the-kitteh/feed/</wfw:commentRss>
		<slash:comments>0</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; title: ; notranslate">
&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>
]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2010/01/02/mangling-strings-for-fun-and-profit/feed/</wfw:commentRss>
		<slash:comments>15</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 [...]]]></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; title: ; notranslate">
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; title: ; notranslate">

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; title: ; notranslate">

default_charset = utf-8

</pre>
]]></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>7</slash:comments>
		</item>
	</channel>
</rss>
