<?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>WPsites</title>
	<atom:link href="http://www.wpsites.co.uk/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wpsites.co.uk</link>
	<description>Wordpress hosting &#38; development</description>
	<lastBuildDate>Wed, 30 Nov 2011 14:15:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Gravity Forms &#8211; adding UK specific address fields</title>
		<link>http://www.wpsites.co.uk/468-gravity-forms-adding-uk-specific-address-field.php</link>
		<comments>http://www.wpsites.co.uk/468-gravity-forms-adding-uk-specific-address-field.php#comments</comments>
		<pubDate>Fri, 11 Nov 2011 00:00:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[Gravity Forms]]></category>

		<guid isPermaLink="false">http://www.wpsites.co.uk/?p=468</guid>
		<description><![CDATA[I haven&#8217;t used Gravity Forms much, as Contact Form 7 is our form plugin of choice, but today a client wanted to have the address changed on one of his Gravity forms. Just State changing to county and zip removing&#160;&#8230; <a href="http://www.wpsites.co.uk/468-gravity-forms-adding-uk-specific-address-field.php">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t used <a href="http://www.gravityforms.com/">Gravity Forms</a> much, as <a href="http://wordpress.org/extend/plugins/contact-form-7/">Contact Form 7</a> is our form plugin of choice, but today a client wanted to have the address changed on one of his Gravity forms. Just State changing to county and zip removing from the post code section.<span id="more-468"></span></p>
<p>On Gravity Forms the individual address fields are not that easy to change since the whole address field set is a single object, with a couple of options such as hiding address line 2. To change the address fields you need to put together some PHP to hook deep within the Gravity Form code and alter the output.</p>
<p><strong>Here is the code that you will need to place in your themes functions.php file:</strong></p>
<pre class="wp-code-highlight prettyprint">

add_filter(&quot;gform_address_types&quot;, &quot;uk_address&quot;, 10, 2);
function uk_address($address_types, $form_id){
$address_types[&quot;uk&quot;] = array(
&quot;label&quot; =&gt; &quot;UK&quot;,
&quot;country&quot; =&gt; &quot;United Kingdom&quot;,
&quot;zip_label&quot; =&gt; &quot;Postcode&quot;,
&quot;state_label&quot; =&gt; &quot;County&quot;,
&quot;states&quot; =&gt; array(&quot;Aberdeenshire&quot;=&gt;&quot;Aberdeenshire&quot;,&quot;Angus/Forfarshire&quot;=&gt;&quot;Angus/Forfarshire&quot;,&quot;Argyllshire&quot;=&gt;&quot;Argyllshire&quot;,&quot;Ayrshire&quot;=&gt;&quot;Ayrshire&quot;,&quot;Banffshire&quot;=&gt;&quot;Banffshire&quot;,&quot;Bedfordshire&quot;=&gt;&quot;Bedfordshire&quot;,&quot;Berkshire&quot;=&gt;&quot;Berkshire&quot;,
&quot;Berwickshire&quot;=&gt;&quot;Berwickshire&quot;,&quot;Blaenau Gwent&quot;=&gt;&quot;Blaenau Gwent&quot;,&quot;Bridgend&quot;=&gt;&quot;Bridgend&quot;,&quot;Buckinghamshire&quot;=&gt;&quot;Buckinghamshire&quot;,&quot;Buteshire&quot;=&gt;&quot;Buteshire&quot;,&quot;Caerphilly&quot;=&gt;&quot;Caerphilly&quot;,&quot;Caithness&quot;=&gt;&quot;Caithness&quot;,
&quot;Cambridgeshire&quot;=&gt;&quot;Cambridgeshire&quot;,&quot;Cardiff&quot;=&gt;&quot;Cardiff&quot;,&quot;Carmarthenshire&quot;=&gt;&quot;Carmarthenshire&quot;,&quot;Ceredigion&quot;=&gt;&quot;Ceredigion&quot;,&quot;Cheshire&quot;=&gt;&quot;Cheshire&quot;,&quot;Clackmannanshire&quot;=&gt;&quot;Clackmannanshire&quot;,
&quot;Conwy&quot;=&gt;&quot;Conwy&quot;,&quot;Cornwall&quot;=&gt;&quot;Cornwall&quot;,&quot;Cromartyshire&quot;=&gt;&quot;Cromartyshire&quot;,&quot;Cumberland&quot;=&gt;&quot;Cumberland&quot;,&quot;Denbighshire&quot;=&gt;&quot;Denbighshire&quot;,&quot;Derbyshire&quot;=&gt;&quot;Derbyshire&quot;,&quot;Devon&quot;=&gt;&quot;Devon&quot;,&quot;Dorset&quot;=&gt;&quot;Dorset&quot;,
&quot;Dumfriesshire&quot;=&gt;&quot;Dumfriesshire&quot;,&quot;Dunbartonshire/Dumbartonshire&quot;=&gt;&quot;Dunbartonshire/Dumbartonshire&quot;,&quot;Durham&quot;=&gt;&quot;Durham&quot;,&quot;East Lothian/Haddingtonshire&quot;=&gt;&quot;East Lothian/Haddingtonshire&quot;,&quot;Essex&quot;=&gt;&quot;Essex&quot;,&quot;Fife&quot;=&gt;&quot;Fife&quot;,
&quot;Flintshire&quot;=&gt;&quot;Flintshire&quot;,&quot;Gloucestershire&quot;=&gt;&quot;Gloucestershire&quot;,&quot;Gwynedd&quot;=&gt;&quot;Gwynedd&quot;,&quot;Hampshire&quot;=&gt;&quot;Hampshire&quot;,&quot;Herefordshire&quot;=&gt;&quot;Herefordshire&quot;,&quot;Hertfordshire&quot;=&gt;&quot;Hertfordshire&quot;,&quot;Huntingdonshire&quot;=&gt;&quot;Huntingdonshire&quot;,
&quot;Inverness-shire&quot;=&gt;&quot;Inverness-shire&quot;,&quot;Isle of Anglesey&quot;=&gt;&quot;Isle of Anglesey&quot;,&quot;Kent&quot;=&gt;&quot;Kent&quot;,&quot;Kincardineshire&quot;=&gt;&quot;Kincardineshire&quot;,&quot;Kinross-shire&quot;=&gt;&quot;Kinross-shire&quot;,&quot;Kirkcudbrightshire&quot;=&gt;&quot;Kirkcudbrightshire&quot;,
&quot;Lanarkshire&quot;=&gt;&quot;Lanarkshire&quot;,&quot;Lancashire&quot;=&gt;&quot;Lancashire&quot;,&quot;Leicestershire&quot;=&gt;&quot;Leicestershire&quot;,&quot;Lincolnshire&quot;=&gt;&quot;Lincolnshire&quot;,&quot;Merthyr Tydfil&quot;=&gt;&quot;Merthyr Tydfil&quot;,&quot;Middlesex&quot;=&gt;&quot;Middlesex&quot;,
&quot;Midlothian/Edinburghshire&quot;=&gt;&quot;Midlothian/Edinburghshire&quot;,&quot;Monmouthshire&quot;=&gt;&quot;Monmouthshire&quot;,&quot;Morayshire&quot;=&gt;&quot;Morayshire&quot;,&quot;Nairnshire&quot;=&gt;&quot;Nairnshire&quot;,&quot;Neath Port Talbot&quot;=&gt;&quot;Neath Port Talbot&quot;,
&quot;Newport&quot;=&gt;&quot;Newport&quot;,&quot;Norfolk&quot;=&gt;&quot;Norfolk&quot;,&quot;Northamptonshire&quot;=&gt;&quot;Northamptonshire&quot;,&quot;Northumberland&quot;=&gt;&quot;Northumberland&quot;,&quot;Nottinghamshire&quot;=&gt;&quot;Nottinghamshire&quot;,&quot;Orkney&quot;=&gt;&quot;Orkney&quot;,
&quot;Oxfordshire&quot;=&gt;&quot;Oxfordshire&quot;,&quot;Peeblesshire&quot;=&gt;&quot;Peeblesshire&quot;,&quot;Pembrokeshire&quot;=&gt;&quot;Pembrokeshire&quot;,&quot;Perthshire&quot;=&gt;&quot;Perthshire&quot;,&quot;Powys&quot;=&gt;&quot;Powys&quot;,&quot;Renfrewshire&quot;=&gt;&quot;Renfrewshire&quot;,
&quot;Rhondda Cynon Taff&quot;=&gt;&quot;Rhondda Cynon Taff&quot;,&quot;Ross-shire&quot;=&gt;&quot;Ross-shire&quot;,&quot;Roxburghshire&quot;=&gt;&quot;Roxburghshire&quot;,&quot;Rutland&quot;=&gt;&quot;Rutland&quot;,&quot;Selkirkshire&quot;=&gt;&quot;Selkirkshire&quot;,&quot;Shetland&quot;=&gt;&quot;Shetland&quot;,&quot;Shropshire&quot;=&gt;&quot;Shropshire&quot;,
&quot;Somerset&quot;=&gt;&quot;Somerset&quot;,&quot;Staffordshire&quot;=&gt;&quot;Staffordshire&quot;,&quot;Stirlingshire&quot;=&gt;&quot;Stirlingshire&quot;,&quot;Suffolk&quot;=&gt;&quot;Suffolk&quot;,&quot;Surrey&quot;=&gt;&quot;Surrey&quot;,&quot;Sussex&quot;=&gt;&quot;Sussex&quot;,&quot;Sutherland&quot;=&gt;&quot;Sutherland&quot;,&quot;Swansea&quot;=&gt;&quot;Swansea&quot;,&quot;Torfaen&quot;=&gt;&quot;Torfaen&quot;,
&quot;Vale of Glamorgan&quot;=&gt;&quot;Vale of Glamorgan&quot;,&quot;Warwickshire&quot;=&gt;&quot;Warwickshire&quot;,&quot;West Lothian/Linlithgowshire&quot;=&gt;&quot;West Lothian/Linlithgowshire&quot;,&quot;Westmorland&quot;=&gt;&quot;Westmorland&quot;,
&quot;Wigtownshire&quot;=&gt;&quot;Wigtownshire&quot;,&quot;Wiltshire&quot;=&gt;&quot;Wiltshire&quot;,&quot;Worcestershire&quot;=&gt;&quot;Worcestershire&quot;,&quot;Wrexham&quot;=&gt;&quot;Wrexham&quot;,&quot;Yorkshire&quot;=&gt;&quot;Yorkshire&quot;)
);
return $address_types;
}
</pre>
<p>Once that code is in place you will then have an additional address type called UK (default options are International, United States and Canadian).</p>
<h1><span style="color: #003366;">Before</span></h1>
<p><img class="size-full wp-image-472 alignnone" title="before" src="http://www.wpsites.co.uk/wp-content/uploads/before.jpg" alt="" width="488" height="223" /></p>
<h1><span style="color: #003366;">After</span></h1>
<p><img class="alignnone size-full wp-image-473" title="after" src="http://www.wpsites.co.uk/wp-content/uploads/after.jpg" alt="" width="488" height="223" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wpsites.co.uk/468-gravity-forms-adding-uk-specific-address-field.php/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Replacing shortcodes in TinyMCE with a graphic</title>
		<link>http://www.wpsites.co.uk/435-replacing-inserted-shortcodes-in-tinymce-with-a-graphic.php</link>
		<comments>http://www.wpsites.co.uk/435-replacing-inserted-shortcodes-in-tinymce-with-a-graphic.php#comments</comments>
		<pubDate>Fri, 28 Oct 2011 14:09:58 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Short codes]]></category>
		<category><![CDATA[TinyMCE]]></category>

		<guid isPermaLink="false">http://www.wpsites.co.uk/?p=435</guid>
		<description><![CDATA[To cut a long story short I went to the Liverpool WordPress interest group last night and one thing that came up that no one seemed to have a solution for was users messing up short codes and how could&#160;&#8230; <a href="http://www.wpsites.co.uk/435-replacing-inserted-shortcodes-in-tinymce-with-a-graphic.php">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>To cut a long story short I went to the <a href="http://interconnectit.com/2986/liverpool-wordpress-interest-group-swig-meeting-27th-october-2011/">Liverpool WordPress interest group</a> last night and one thing that came up that no one seemed to have a solution for was users messing up short codes and how could we replace the short code with a more user friendly image just like the WordPress gallery short code.<span id="more-435"></span>This must have played on my mind because I woke this morning a couple of hours before the alarm and just had to get up and find a solution.</p>
<p>To create the plugin I had to find a short code which I could then attempt to replace with a graphic and since <a href="http://interconnectit.com/2364/announcing-spots/">Spots from Interconnect IT</a> is one of my favourite plugins right now I thought I would use that. So I have created a plugin that will replace any &#8220;icitspot&#8221; short codes with a small graphic. This plugin isn&#8217;t meant for release, it was made quickly this morning (when I say quickly I mean the whole morning) and  isn&#8217;t thoroughly tested. Hopefully it may help someone who is trying to achieve similar things with their own plugin short codes.</p>
<h3>Quick rundown on how the plugin works</h3>
<p>The plugins main php file uses just two filters (mce_external_plugins, tiny_mce_before_init) to add our TinyMCE plugin and an extra CSS file for styling.</p>
<p>Most of the code that does the bulk of the work is inside tinymce-plugin/icitspots/editor_plugin.js which is in effect a <a href="http://www.tinymce.com/wiki.php/API3:class.tinymce.Plugin">TinyMCE plugin</a>.</p>
<p>I borrowed some code and structure from \wp-includes\js\tinymce\plugins\wpgallery\editor_plugin.dev so if you want to add buttons and click events to this then take a look at that file for guidance.</p>
<p><a href="http://www.wpsites.co.uk/wp-content/uploads/tinymce-graphical-shortcode.zip">You can download the plugin files here.</a></p>
<p>Hopefully this will be of use to someone. I&#8217;d like to think the code is pretty straight forward. Send us a comment if you have any questions or observations.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wpsites.co.uk/435-replacing-inserted-shortcodes-in-tinymce-with-a-graphic.php/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Being More Social</title>
		<link>http://www.wpsites.co.uk/439-being-more-social.php</link>
		<comments>http://www.wpsites.co.uk/439-being-more-social.php#comments</comments>
		<pubDate>Fri, 28 Oct 2011 13:26:13 +0000</pubDate>
		<dc:creator>lucy</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[WP Sites news]]></category>

		<guid isPermaLink="false">http://www.wpsites.co.uk/?p=439</guid>
		<description><![CDATA[At WP Sites we&#8217;re admittedly not the best at keeping in touch with the WordPress community through social media.  I&#8217;m sure most WordPress and hosting professionals find, like we do, that you&#8217;re busy with your own infrastructure and client&#8217;s projects,&#160;&#8230; <a href="http://www.wpsites.co.uk/439-being-more-social.php">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>At WP Sites we&#8217;re admittedly not the best at keeping in touch with the WordPress community through social media.  I&#8217;m sure most WordPress and hosting professionals find, like we do, that you&#8217;re busy with your own infrastructure and client&#8217;s projects, and need to make a conscious effort to look away from your development platform and pause to talk about it!</p>
<p>Now and then we do have a eureka or a huh? moment that we want to share.  And we&#8217;ve enjoyed a recent plethora of WordPress meet-ups that have inspired both questions and answers that deserve further research and discussion.  Over the last month we&#8217;ve managed to attend the inaugural WordPress Birmingham (don&#8217;t forget the UK) meetup, South Yorkshire WordPress User Group and Liverpool WordPress Interest Group (SWIG) &#8211; almost a clean sweep of the North West WordPress user groups and a diverse mixture of attendees, agendas and accents.  Thanks to the organisers and users of those groups we may finally have the push we need to become more social and do a little sharing&#8230;</p>
<p>So welcome to our blog where we may talk about WordPress development, hosting and anything else that gives us pause for thought..</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wpsites.co.uk/439-being-more-social.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced

Served from: www.wpsites.co.uk @ 2012-02-08 06:45:43 -->
