<?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>channeleaton</title>
	<atom:link href="http://channeleaton.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://channeleaton.com</link>
	<description>wordpress, web development, and extra tasty bits</description>
	<lastBuildDate>Fri, 18 May 2012 02:10:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>PHP in_array() only matches value in the first array position</title>
		<link>http://channeleaton.com/2012/02/php-in_array-only-matches-the-first/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=php-in_array-only-matches-the-first</link>
		<comments>http://channeleaton.com/2012/02/php-in_array-only-matches-the-first/#comments</comments>
		<pubDate>Thu, 01 Mar 2012 04:49:43 +0000</pubDate>
		<dc:creator>J. Aaron Eaton</dc:creator>
				<category><![CDATA[featured]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[arrays]]></category>
		<category><![CDATA[trim]]></category>

		<guid isPermaLink="false">http://channeleaton.com/?p=7044</guid>
		<description><![CDATA[While trying to create a tagging function for a new blog system I&#8217;m currently building, I kept running into trouble when using is_array() to find the tags for each post. Let&#8217;s say we have a tag array that was populated from a text file: And now we want to check if a specific tag is in [...]]]></description>
			<content:encoded><![CDATA[<p>While trying to create a tagging function for a <a title="MD-Blog" href="https://github.com/channeleaton/md-blog">new blog system</a> I&#8217;m currently building, I kept running into trouble when using is_array() to find the tags for each post.</p>
<p>Let&#8217;s say we have a tag array that was <strong>populated from a text file</strong>:</p>
<pre class="brush: php; title: ; notranslate">
$tags = array( 'a', 'b', 'c' );
</pre>
<p>And now we want to check if a specific tag is in both arrays:</p>
<pre class="brush: php; title: ; notranslate">
if ( in_array( 'a', $tags ) ) {

$response = 'Tag found';

} else {

$response = 'Tag not found';

}
</pre>
<p>As we expected, $response = &#8216;Tag found&#8217;. But if we search for &#8216;b&#8217;, $response = &#8216;Tag not found&#8217; even though we can see very clearly that the value &#8216;b&#8217; exists in the array $tags.</p>
<p>What&#8217;s the solution?</p>
<p>The key to the solution lies in the fact that the array $tags was populated from a text file. Text files can contain all sorts of hidden characters that in_array() can pick up when comparing parameters. The fix is simple. Before passing the $tags array to in_array(), trim up each of the array values like so:</p>
<pre class="brush: php; title: ; notranslate">
$tags = array_map( 'trim', $tags );
</pre>
<p>This took me a good 3 hours to figure out. I hope you found this article in less time.</p>
]]></content:encoded>
			<wfw:commentRss>http://channeleaton.com/2012/02/php-in_array-only-matches-the-first/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oh great. I&#8217;ve gone full-nerd</title>
		<link>http://channeleaton.com/2012/02/gone-full-nerd/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=gone-full-nerd</link>
		<comments>http://channeleaton.com/2012/02/gone-full-nerd/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 22:39:32 +0000</pubDate>
		<dc:creator>J. Aaron Eaton</dc:creator>
				<category><![CDATA[miscellaneous]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[zsh]]></category>

		<guid isPermaLink="false">http://channeleaton.com/?p=5837</guid>
		<description><![CDATA[Oh great. I&#8217;ve gone full-nerd. You never go full-nerd&#8230;]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://channeleaton.com/wp-content/uploads/2012/02/terminal-nerd.png"><img class="aligncenter  wp-image-5838" title="terminal-nerd" src="http://channeleaton.com/wp-content/uploads/2012/02/terminal-nerd.png" alt="" width="594" height="446" /></a></p>
<p>Oh great. I&#8217;ve gone full-nerd.</p>
<p>You never go full-nerd&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://channeleaton.com/2012/02/gone-full-nerd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New WordPress Plugin &#8211; WP Slider.js</title>
		<link>http://channeleaton.com/2012/02/new-wordpress-plugin-wp-slider-js/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=new-wordpress-plugin-wp-slider-js</link>
		<comments>http://channeleaton.com/2012/02/new-wordpress-plugin-wp-slider-js/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 23:30:01 +0000</pubDate>
		<dc:creator>J. Aaron Eaton</dc:creator>
				<category><![CDATA[featured]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wpsliderjs]]></category>

		<guid isPermaLink="false">http://channeleaton.com/?p=4643</guid>
		<description><![CDATA[I just wanted to let you know about a plugin I&#8217;m currently working on. Yeah. It&#8217;s yet another feature/image slider but this one is based on the new, beautiful Slider.js by Gaetan Renaudeau. WP Slider.js will allow you to pull the featured images from any category and create a slider with one simple template tag. Read [...]]]></description>
			<content:encoded><![CDATA[<p>I just wanted to let you know about a plugin I&#8217;m currently working on. Yeah. It&#8217;s yet another feature/image slider but this one is based on the new, beautiful <a href="http://sliderjs.org">Slider.js</a> by <a href="http://gaetanrenaudeau.fr/" rel="nofollow" target="_blank">Gaetan Renaudeau</a>.</p>
<p>WP Slider.js will allow you to pull the featured images from any category and create a slider with one simple template tag. Read more about the plugin on the <a title="WP Slider.js" href="http://channeleaton.com/projects/wp-slider-js/">project page</a>. I hope that you will enjoy this plugin as much as I have.</p>
]]></content:encoded>
			<wfw:commentRss>http://channeleaton.com/2012/02/new-wordpress-plugin-wp-slider-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The excitement and wonder of the dog park</title>
		<link>http://channeleaton.com/2012/01/the-excitement-and-wonder-of-the-dog-park/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-excitement-and-wonder-of-the-dog-park</link>
		<comments>http://channeleaton.com/2012/01/the-excitement-and-wonder-of-the-dog-park/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 20:14:53 +0000</pubDate>
		<dc:creator>J. Aaron Eaton</dc:creator>
				<category><![CDATA[miscellaneous]]></category>

		<guid isPermaLink="false">http://channeleaton.com/?p=4053</guid>
		<description><![CDATA[Buy a pair of GoPro HD cameras Strap to dog ??????? Profit!]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://player.vimeo.com/video/35616659" width="575" height="323" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></p>
<ol>
<li>Buy a pair of GoPro HD cameras</li>
<li>Strap to dog</li>
<li>???????</li>
<li>Profit!</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://channeleaton.com/2012/01/the-excitement-and-wonder-of-the-dog-park/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New, beautiful icons from WebDesign Tuts+</title>
		<link>http://channeleaton.com/2011/12/new-beautiful-icons-from-webdesign-tuts/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=new-beautiful-icons-from-webdesign-tuts</link>
		<comments>http://channeleaton.com/2011/12/new-beautiful-icons-from-webdesign-tuts/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 14:47:56 +0000</pubDate>
		<dc:creator>J. Aaron Eaton</dc:creator>
				<category><![CDATA[miscellaneous]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[icons]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://channeleaton.com/?p=553</guid>
		<description><![CDATA[WebDesign Tuts+ has released a set of 50 icons to use in your own web designs. Get the files here.]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://webdesign.tutsplus.com/freebies/icons-freebies/exclusive-freebie-50-crisp-web-app-icons/"><img class="aligncenter  wp-image-554" title="50_icons" src="http://channeleaton.com/wp-content/uploads/2011/12/50_icons.png" alt="" width="418" height="231" /></a></p>
<p>WebDesign Tuts+ has released a set of 50 icons to use in your own web designs. Get the files <a title="Free Web Icons" href="http://webdesign.tutsplus.com/freebies/icons-freebies/exclusive-freebie-50-crisp-web-app-icons/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://channeleaton.com/2011/12/new-beautiful-icons-from-webdesign-tuts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What happens when a steam pipe bursts next to a fiber line?</title>
		<link>http://channeleaton.com/2011/12/what-happens-when-a-steam-pipe-bursts-next-to-a-fiber-line/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=what-happens-when-a-steam-pipe-bursts-next-to-a-fiber-line</link>
		<comments>http://channeleaton.com/2011/12/what-happens-when-a-steam-pipe-bursts-next-to-a-fiber-line/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 15:44:37 +0000</pubDate>
		<dc:creator>J. Aaron Eaton</dc:creator>
				<category><![CDATA[miscellaneous]]></category>
		<category><![CDATA[stupid]]></category>

		<guid isPermaLink="false">http://channeleaton.com/?p=491</guid>
		<description><![CDATA[This is what happens when a steam pipe bursts next to a fiber line&#8230;]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://channeleaton.com/wp-content/uploads/2011/12/fiber_steam.jpg"><img class="aligncenter  wp-image-492" title="fiber_steam" src="http://channeleaton.com/wp-content/uploads/2011/12/fiber_steam.jpg" alt="" width="648" height="486" /></a></p>
<p>This is what happens when a steam pipe bursts next to a fiber line&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://channeleaton.com/2011/12/what-happens-when-a-steam-pipe-bursts-next-to-a-fiber-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable Facebook comments on your WordPress blog</title>
		<link>http://channeleaton.com/2011/12/enable-facebook-comments-on-your-wordpress-blog/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=enable-facebook-comments-on-your-wordpress-blog</link>
		<comments>http://channeleaton.com/2011/12/enable-facebook-comments-on-your-wordpress-blog/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 15:00:20 +0000</pubDate>
		<dc:creator>J. Aaron Eaton</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[facebook]]></category>

		<guid isPermaLink="false">http://channeleaton.com/?p=266</guid>
		<description><![CDATA[Wptuts+ has a great write-up on how to enable Facebook comments on your WordPress blog. I was pleasantly surprised to find how easy the process has become. I would make one improvement. Instead of hard-coding the &#60;meta&#62; tag to add your app id, I would insert the following into your functions.php file: That code should make [...]]]></description>
			<content:encoded><![CDATA[<p>Wptuts+ has a great write-up on <a title="Add Facebook comments" href="http://wp.tutsplus.com/tutorials/add-facebook-comments-to-your-wordpress-theme/" target="_blank">how to enable Facebook comments</a> on your WordPress blog. I was pleasantly surprised to find how easy the process has become.</p>
<p>I would make one improvement. Instead of hard-coding the <code>&lt;meta&gt;</code> tag to add your app id, I would insert the following into your <code>functions.php</code> file:</p>
<pre class="brush: php; title: ; notranslate">
/* Add meta info required for Facebook comments */
add_action( 'wp_head', 'channeleaton_facebook_comments' );
function channeleaton_facebook_comments() {
?&gt;
	&lt;meta property='fb:app_id' content='YOUR APP ID' /&gt;
&lt;?php
}
</pre>
<p>That code should make it a bit easier for those of you using child themes.</p>
]]></content:encoded>
			<wfw:commentRss>http://channeleaton.com/2011/12/enable-facebook-comments-on-your-wordpress-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best plugin to get RSS feeds into your WordPress loop</title>
		<link>http://channeleaton.com/2011/12/rss-feed-in-wordpress-loop/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss-feed-in-wordpress-loop</link>
		<comments>http://channeleaton.com/2011/12/rss-feed-in-wordpress-loop/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 23:36:26 +0000</pubDate>
		<dc:creator>J. Aaron Eaton</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[aggregator]]></category>
		<category><![CDATA[rss]]></category>

		<guid isPermaLink="false">http://channeleaton.com/?p=259</guid>
		<description><![CDATA[Have you ever wanted to aggregate news feeds into your WordPress blog ? The FeedWordPress plugin makes it extremely easy for you. FeedWordPress allows you to bring in any RSS or Atom feed and display it however you choose. It could be used to build the next great news aggregator or  your lifestream. The plugin [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wanted to aggregate news feeds into your WordPress blog ? The <a title="FeedWordPress" href="http://feedwordpress.radgeek.com">FeedWordPress plugin</a> makes it extremely easy for you.</p>
<p>FeedWordPress allows you to bring in any RSS or Atom feed and display it however you choose. It could be used to build the next great news aggregator or  your lifestream. The plugin is actively developed and documentation is very well written.</p>
<p>Take a moment to check out this great plugin.</p>
]]></content:encoded>
			<wfw:commentRss>http://channeleaton.com/2011/12/rss-feed-in-wordpress-loop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No-car weekend</title>
		<link>http://channeleaton.com/2011/12/no-car-weekend/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=no-car-weekend</link>
		<comments>http://channeleaton.com/2011/12/no-car-weekend/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 18:06:47 +0000</pubDate>
		<dc:creator>J. Aaron Eaton</dc:creator>
				<category><![CDATA[cycling]]></category>
		<category><![CDATA[no-car]]></category>

		<guid isPermaLink="false">http://channeleaton.com/?p=319</guid>
		<description><![CDATA[I&#8217;m having a great time riding my bike around town this weekend.]]></description>
			<content:encoded><![CDATA[<p><a href="http://channeleaton.com/wp-content/uploads/2011/12/20111218-120745.jpg"><img class="alignnone size-full" src="http://channeleaton.com/wp-content/uploads/2011/12/20111218-120745.jpg" alt="20111218-120745.jpg" /></a></p>
<p>I&#8217;m having a great time riding my bike around town this weekend.</p>
]]></content:encoded>
			<wfw:commentRss>http://channeleaton.com/2011/12/no-car-weekend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Photos from the half-marathon</title>
		<link>http://channeleaton.com/2011/12/photos-from-the-half-marathon/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=photos-from-the-half-marathon</link>
		<comments>http://channeleaton.com/2011/12/photos-from-the-half-marathon/#comments</comments>
		<pubDate>Sat, 17 Dec 2011 19:48:41 +0000</pubDate>
		<dc:creator>J. Aaron Eaton</dc:creator>
				<category><![CDATA[running]]></category>

		<guid isPermaLink="false">http://channeleaton.com/?p=207</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[
<div class="ngg-imagebrowser" id="ngg-imagebrowser-1-207">

	<h3>Gave up on the porta-poty</h3>

	<div class="pic">
<a href="http://channeleaton.com/wp-content/gallery/bcs-half-marathon/img_0592.jpg" title="" class="shutterset_bcs-half-marathon">
	<img alt="Gave up on the porta-poty" src="http://channeleaton.com/wp-content/gallery/bcs-half-marathon/img_0592.jpg"/>
</a>
</div>
	<div class="ngg-imagebrowser-nav"> 
		<div class="back">
			<a class="ngg-browser-prev" id="ngg-prev-24" href="http://channeleaton.com/2011/12/photos-from-the-half-marathon/?pid=24">&#9668; Back</a>
		</div>
		<div class="next">
			<a class="ngg-browser-next" id="ngg-next-2" href="http://channeleaton.com/2011/12/photos-from-the-half-marathon/?pid=2">Next &#9658;</a>
		</div>
		<div class="counter">Picture 1 of 24</div>
		<div class="ngg-imagebrowser-desc"><p> </p></div>
	</div>	

</div>	


]]></content:encoded>
			<wfw:commentRss>http://channeleaton.com/2011/12/photos-from-the-half-marathon/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/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/28 queries in 0.056 seconds using disk: basic
Object Caching 1296/1352 objects using disk: basic

Served from: channeleaton.com @ 2012-05-20 15:19:02 -->
