<?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>Fight the Current</title>
	<atom:link href="http://fightthecurrent.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://fightthecurrent.org</link>
	<description>Articles, Thoughts, Humor, and Advanced discussions on Professional WordPress Development</description>
	<lastBuildDate>Thu, 28 Mar 2013 23:07:02 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Browser Versions are Dead</title>
		<link>http://fightthecurrent.org/320/browser-versions-are-dead/</link>
		<comments>http://fightthecurrent.org/320/browser-versions-are-dead/#comments</comments>
		<pubDate>Thu, 28 Mar 2013 23:07:02 +0000</pubDate>
		<dc:creator>Nathaniel</dc:creator>
				<category><![CDATA[Videos]]></category>

		<guid isPermaLink="false">http://fightthecurrent.org/?p=320</guid>
		<description><![CDATA[This presentation, by Kyle Simpson , is licensed under a Creative Commons Attribution ShareAlike 3.0]]></description>
				<content:encoded><![CDATA[<div class="videoContainer"><iframe width="500" height="281" src="http://www.youtube.com/embed/gAxTilYa5bo?feature=oembed" frameborder="0" allowfullscreen></iframe></div>
<p>This presentation, by Kyle Simpson , is licensed under a <a href="http://creativecommons.org/licenses/by-sa/3.0/" target="_blank" rel="license">Creative Commons Attribution ShareAlike 3.0</a></p>
]]></content:encoded>
			<wfw:commentRss>http://fightthecurrent.org/320/browser-versions-are-dead/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Intro to Web Components</title>
		<link>http://fightthecurrent.org/312/intro-to-web-components/</link>
		<comments>http://fightthecurrent.org/312/intro-to-web-components/#comments</comments>
		<pubDate>Thu, 28 Mar 2013 21:22:55 +0000</pubDate>
		<dc:creator>Nathaniel</dc:creator>
				<category><![CDATA[Links & Quotes]]></category>

		<guid isPermaLink="false">http://fightthecurrent.org/?p=312</guid>
		<description><![CDATA[Adobe covered some issues pertaining to CSS as it currently exists: all CSS is defined in a global namespace. They also covered some ways to make it work for you, like using a components name as a prefix ( ie .widget-title instead of .widget .title ),  using library names as namespaces, and using preprocessors to dynamically use [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.adobe.com/devnet/html5/articles/css-everything-is-global-and-how-to-deal-with-it.html">Adobe</a> covered some issues pertaining to CSS as it currently exists: <a href="http://www.adobe.com/devnet/html5/articles/css-everything-is-global-and-how-to-deal-with-it.html">all CSS is defined in a global namespace</a>. They also covered some ways to make it work for you, like using a components name as a prefix ( ie .widget-title instead of .widget .title ),  using library names as namespaces, and using preprocessors to dynamically use namespaces. One of the topics they covered though that I was most interested in, however, was <a href="https://dvcs.w3.org/hg/webcomponents/raw-file/tip/explainer/index.html">Web Components</a>. ( <a href="http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom/">here&#8217;s another brief intro as well</a> )</p>
<p>Web components allow you to encapsulate recurring sections of your page like widgets, alert buttons, etc. One of their other advantages is giving CSS a scope to work in. Any CSS that&#8217;s applied to the component inside the file ( ie alert-component.html ) <strong>will be applied only to elements in that file</strong>.</p>
<p><img class="alignnone" alt="MRW someone says exactly what I'm thinking." src="http://i.imgur.com/5gC5sKD.gif" width="230" height="249" /></p>
<p>That&#8217;s nuts. Read on, fair traveler:</p>
<p><a href="http://adobe.ly/13BJV8l">CSS: Everything is global and how to deal with it</a></p>
<p><a href="http://bit.ly/XKi6Td">HTML5 Rocks: Shadow DOM 101</a></p>
<p><a href="http://bit.ly/10hMNzI">W3C: Intro to Web Components</a></p>
]]></content:encoded>
			<wfw:commentRss>http://fightthecurrent.org/312/intro-to-web-components/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordCamp Atlanta &#124;&#124; What the Git?</title>
		<link>http://fightthecurrent.org/307/wordcamp-atlanta-what-the-git/</link>
		<comments>http://fightthecurrent.org/307/wordcamp-atlanta-what-the-git/#comments</comments>
		<pubDate>Fri, 15 Mar 2013 14:04:43 +0000</pubDate>
		<dc:creator>Nathaniel</dc:creator>
				<category><![CDATA[Announcements]]></category>

		<guid isPermaLink="false">http://fightthecurrent.org/?p=307</guid>
		<description><![CDATA[Today is the day!! WordCamp Atlanta is just starting and it&#8217;s going to be a great time. I&#8217;ll be speaking in the Dev room on the how and why git is awesome. If you&#8217;re interested, you can grab the slides at slideshare here. I&#8217;d love for you to stop by and say hi!]]></description>
				<content:encoded><![CDATA[<p>Today is the day!! <a href="http://2013.atlanta.wordcamp.org" target="_blank">WordCamp Atlanta</a> is just starting and it&#8217;s going to be a great time. I&#8217;ll be speaking in the Dev room on the how and why <a href="http://git-scm.com" target="_blank">git</a> is awesome. If you&#8217;re interested, you can grab the slides at <a href="http://www.slideshare.net/nathanielks/wc-atlanta-what-the-git" target="_blank">slideshare here</a>. I&#8217;d love for you to stop by and say hi!</p>
]]></content:encoded>
			<wfw:commentRss>http://fightthecurrent.org/307/wordcamp-atlanta-what-the-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Guages, not Cages &#124;&#124; Work Vs Play</title>
		<link>http://fightthecurrent.org/303/guages-not-cages-work-vs-play/</link>
		<comments>http://fightthecurrent.org/303/guages-not-cages-work-vs-play/#comments</comments>
		<pubDate>Tue, 12 Mar 2013 20:44:35 +0000</pubDate>
		<dc:creator>Nathaniel</dc:creator>
				<category><![CDATA[Links & Quotes]]></category>

		<guid isPermaLink="false">http://fightthecurrent.org/?p=303</guid>
		<description><![CDATA[I love the thoughts behind this. Rather than build cages, and lock our employees in them, I’d rather build gauges and passively monitor them. If someone is slacking off, it will come out through the natural course of daily work, interaction, and collaboration with each other. 8Bit: Gauges, not Cages]]></description>
				<content:encoded><![CDATA[<p>I love the thoughts behind this.</p>
<blockquote><p>Rather than build cages, and lock our employees in them, I’d rather build gauges and passively monitor them. If someone is slacking off, it will come out through the natural course of daily work, interaction, and collaboration with each other.</p></blockquote>
<p><a href="http://8bit.io/gauges-not-cages/">8Bit: Gauges, not Cages</a></p>
]]></content:encoded>
			<wfw:commentRss>http://fightthecurrent.org/303/guages-not-cages-work-vs-play/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pictures from a developer&#8217;s life</title>
		<link>http://fightthecurrent.org/276/pictures-from-a-developers-life/</link>
		<comments>http://fightthecurrent.org/276/pictures-from-a-developers-life/#comments</comments>
		<pubDate>Fri, 01 Mar 2013 22:27:16 +0000</pubDate>
		<dc:creator>Nathaniel</dc:creator>
				<category><![CDATA[Gif Invasion]]></category>

		<guid isPermaLink="false">http://fightthecurrent.org/?p=276</guid>
		<description><![CDATA[I have a special place in my heart for gifs, and it&#8217;s even better when they&#8217;re related to development. I decided to share a few of my favorites. When I show the boss that I have finally fixed this bug And another: When my regex returned exactly what I expected Many thanks to Sonny for [...]]]></description>
				<content:encoded><![CDATA[<p>I have a special place in my heart for gifs, and it&#8217;s even better when they&#8217;re <a href="http://martinvalasek.com/blog/pictures-from-a-developers-life">related to development</a>. I decided to share a few of my favorites.</p>
<blockquote><p>When I show the boss that I have finally fixed this bug</p>
<p><img class="alignnone size-full wp-image-277" alt="When I show the boss that I have finally fixed this bug" src="http://fightthecurrent.org/wp-content/uploads/2013/03/code-07.gif" width="320" height="180" /></p></blockquote>
<p>And another:</p>
<blockquote><p>When my regex returned exactly what I expected</p>
<p><img class="alignnone size-full wp-image-278" alt="When my regex returned exactly what I expected" src="http://fightthecurrent.org/wp-content/uploads/2013/03/code-03.gif" width="270" height="130" /></p></blockquote>
<p>Many thanks to <a href="https://twitter.com/scrogson" target="_blank">Sonny</a> for sharing this with me. Check out <a href="http://martinvalasek.com/blog/pictures-from-a-developers-life">part 1</a> and <a href="http://martinvalasek.com/blog/pictures-from-a-developers-life-part-2">part 2</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://fightthecurrent.org/276/pictures-from-a-developers-life/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Being a Modern Superhero &#124;&#124; What most schools don&#8217;t teach</title>
		<link>http://fightthecurrent.org/267/being-a-modern-superhero/</link>
		<comments>http://fightthecurrent.org/267/being-a-modern-superhero/#comments</comments>
		<pubDate>Wed, 27 Feb 2013 16:47:11 +0000</pubDate>
		<dc:creator>Nathaniel</dc:creator>
				<category><![CDATA[Musings]]></category>

		<guid isPermaLink="false">http://fightthecurrent.org/?p=267</guid>
		<description><![CDATA[I remember being 12 when I first encountered CSS and HMTL. It blew my mind, and at the time, was absurdly complex. I was &#8220;journaling&#8221; on OpenDiary.com and it allowed you to modify your own css and html structure. I was learning Front End while pouring my heart out about why my latest crush didn&#8217;t [...]]]></description>
				<content:encoded><![CDATA[<div class="videoContainer"><iframe width="500" height="281" src="http://www.youtube.com/embed/nKIu9yen5nc?feature=oembed" frameborder="0" allowfullscreen></iframe></div>
<p>I remember being 12 when I first encountered CSS and HMTL. It blew my mind, and at the time, was absurdly complex. I was &#8220;journaling&#8221; on OpenDiary.com and it allowed you to modify your own css and html structure. I was learning Front End while pouring my heart out about why my latest crush didn&#8217;t like me.</p>
<p>12 years later I&#8217;m making my living as a Front End Web Developer. Between messing around with computer parts found on the side of the road, building websites, and fantasizing about the latest gadgets, it seems my life has centered around computers. And it&#8217;s crazy how much it&#8217;s taught me, my little obsession. I&#8217;ve learned that <a href="http://kottke.org/12/04/source-code-for-apollo-and-gemini-programs">ropes can remember things</a>. I&#8217;ve learned that <a href="http://www.extremetech.com/extreme/132918-the-laser-powered-bionic-eye-that-gives-576-pixel-grayscale-vision-to-the-blind">blind people can see</a>. And I&#8217;ve <a href="http://www.youtube.com/watch?v=oQ6TI1rBOqk">learned</a> <a href="http://www.youtube.com/watch?v=A9NjcFhWXAk&amp;list=LLKaO5jB1mh1aRtrWq166p4A">how</a> <a href="http://www.youtube.com/watch?v=IUfBEEphmwI">motorcycles</a> <a href="http://www.youtube.com/watch?v=oIU-lGc3DL4">work</a>. Why motorcycles? Because I&#8217;m interested in them! If development has taught me anything, it&#8217;s to pursue learning what I&#8217;m interested in and find out how things work. Interest begets learning.</p>
<p>It&#8217;s also taught me problem solving. That&#8217;s something I thank my Dad a lot for teaching me. Problem solving has been one of the best skills I&#8217;ve ever had because it doesn&#8217;t just apply to web development; problem solving applies to life. I never realized until years after the purpose of math in grade school: to teach logic and problem solving. The problem is I never gave two shits about math, so I wasn&#8217;t very good at it. I wonder what would have happened if they taught us development in high school, how would that have changed things? And what about other kids that don&#8217;t think they&#8217;re good at math or other subjects? When you learn development, you&#8217;re not only learning logic and problem solving, but <strong>you&#8217;re able to create something</strong>. I find that far more valuable than figuring out the (some mathematical formula).</p>
<p>And that&#8217;s why I feel like I&#8217;m a modern day superhero. I can create something out of thin air. I can type on my keyboard for hours and hours and create something. I can mash data together like nobodies business, and most of my friends have no earthly idea what I&#8217;m doing. Coding for me is about creating something from a problem. How about you? How has coding made you a modern day superhero?</p>
]]></content:encoded>
			<wfw:commentRss>http://fightthecurrent.org/267/being-a-modern-superhero/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When a taxonomy doesn&#8217;t want to exist &#124;&#124; Name length woes</title>
		<link>http://fightthecurrent.org/261/when-a-taxonomy-doesnt-want-to-exist-name-length-woes/</link>
		<comments>http://fightthecurrent.org/261/when-a-taxonomy-doesnt-want-to-exist-name-length-woes/#comments</comments>
		<pubDate>Sat, 23 Feb 2013 21:45:20 +0000</pubDate>
		<dc:creator>Nathaniel</dc:creator>
				<category><![CDATA[Brain Burners]]></category>

		<guid isPermaLink="false">http://fightthecurrent.org/?p=261</guid>
		<description><![CDATA[I&#8217;m currently working on a plugin that migrates users from one system to WordPress when while I was developing, I encountered a problem. My script programmatically creates taxonomies and terms, but for whatever reason 3 specific taxonomies did not want to be created, no matter how many times I tried. While I was debugging, this is the [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m currently working on a plugin that migrates users from one system to WordPress when while I was developing, I encountered a problem. My script programmatically creates taxonomies and terms, but for whatever reason 3 specific taxonomies did not want to be created, no matter how many times I tried. While I was debugging, this is the sort of output I was encountering:</p>
<p><img class="alignnone size-full wp-image-262" alt="Darn those persistent bugs..." src="http://fightthecurrent.org/wp-content/uploads/2013/02/Screen-Shot-2013-02-23-at-3.39.04-PM.png" width="597" height="245" /></p>
<p>For the life of me, I could not figure out what it was, until today. I was looking at all the taxonomies and noticed that these 3 particular taxonomies all had longer names than the rest. Not much longer, but longer nonetheless. After Googleing for some time, I stumbled upon a <a href="http://wordpress.stackexchange.com/questions/64744/does-wordpress-limit-the-length-of-slug-names-for-post-meta-or-terms">StackExchange post</a> talking about this very subject:</p>
<blockquote><p>The name of the taxonomy. Name should be in <i>slug</i> form (must not contain capital letters or spaces) and <strong>not more than 32 characters long</strong> (database structure restriction).</p></blockquote>
<p>There it was. My taxonomy names were too long. Hopefully you&#8217;ll find this answer a lot sooner than I did.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://fightthecurrent.org/261/when-a-taxonomy-doesnt-want-to-exist-name-length-woes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Foundation Reveal.js and Vimeo Players</title>
		<link>http://fightthecurrent.org/257/foundation-reveal-js-and-vimeo-players/</link>
		<comments>http://fightthecurrent.org/257/foundation-reveal-js-and-vimeo-players/#comments</comments>
		<pubDate>Fri, 22 Feb 2013 20:14:12 +0000</pubDate>
		<dc:creator>Nathaniel</dc:creator>
				<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://fightthecurrent.org/?p=257</guid>
		<description><![CDATA[Do you use Zurb&#8217;s Foundation 3 Framework? Per chance, do you also use their Reveal.js Modal? OH OH! WAIT. Do you also want to show a Vimeo video, but are intensely annoyed when you close it and the player keeps playing? A client of mine was annoyed too and was wondering how to fix it. [...]]]></description>
				<content:encoded><![CDATA[<p>Do you use Zurb&#8217;s Foundation 3 Framework? Per chance, do you also use their Reveal.js Modal? OH OH! WAIT. Do you also want to show a Vimeo video, but are intensely annoyed when you close it and the player keeps playing? A client of mine was annoyed too and was wondering how to fix it. Well, thanks to Alettieri&#8217;s posts (<a href="https://github.com/zurb/foundation/issues/433#issuecomment-7586112">github</a>, <a href="http://jsfiddle.net/alettieri/NdCUj/2/">jsfiddle</a>), we were able to figure it out too. Be sure to include <a href="https://github.com/vimeo/player-api/tree/master/javascript">Vimeo&#8217;s Froogaloop API script</a> for this to work.</p>
<div class="videoContainer"><iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/alettieri/NdCUj/2/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe></div>
]]></content:encoded>
			<wfw:commentRss>http://fightthecurrent.org/257/foundation-reveal-js-and-vimeo-players/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Leaflet, Worldmaps, and GeoJSON</title>
		<link>http://fightthecurrent.org/252/leaflet-worldmaps-and-geojson/</link>
		<comments>http://fightthecurrent.org/252/leaflet-worldmaps-and-geojson/#comments</comments>
		<pubDate>Fri, 22 Feb 2013 19:27:57 +0000</pubDate>
		<dc:creator>Nathaniel</dc:creator>
				<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://fightthecurrent.org/?p=252</guid>
		<description><![CDATA[Here are some things you&#8217;ll need when working with GeoJSON and Leaflet on OS X: http://gis.stackexchange.com/questions/17435/where-can-i-find-country-borders-data-in-human-readable-format http://hub.qgis.org/projects/quantum-gis/wiki/Download#3-MacOS-X http://www.kyngchaos.com/software/qgis (Don&#8217;t forget the requirements!) http://thematicmapping.org/downloads/world_borders.php (This is where the shapefile for all the world borders are)]]></description>
				<content:encoded><![CDATA[<p>Here are some things you&#8217;ll need when working with GeoJSON and Leaflet on OS X:</p>
<ul>
<li><a href="http://gis.stackexchange.com/questions/17435/where-can-i-find-country-borders-data-in-human-readable-format">http://gis.stackexchange.com/questions/17435/where-can-i-find-country-borders-data-in-human-readable-format</a></li>
<li><a href="http://hub.qgis.org/projects/quantum-gis/wiki/Download#3-MacOS-X">http://hub.qgis.org/projects/quantum-gis/wiki/Download#3-MacOS-X</a></li>
<li><a href="http://www.kyngchaos.com/software/qgis">http://www.kyngchaos.com/software/qgis</a> (Don&#8217;t forget the requirements!)</li>
<li><a href="http://thematicmapping.org/downloads/world_borders.php">http://thematicmapping.org/downloads/world_borders.php</a> (This is where the shapefile for all the world borders are)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://fightthecurrent.org/252/leaflet-worldmaps-and-geojson/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WooCommerce Sale Items pushed to beginning</title>
		<link>http://fightthecurrent.org/242/gist-woocommerce-sale-items-up-front/</link>
		<comments>http://fightthecurrent.org/242/gist-woocommerce-sale-items-up-front/#comments</comments>
		<pubDate>Wed, 23 Jan 2013 05:20:01 +0000</pubDate>
		<dc:creator>Nathaniel</dc:creator>
				<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://fightthecurrent.org/?p=242</guid>
		<description><![CDATA[Hey Everybody! I promised I&#8217;d get a blog post out today, so here goes! Recently, I had a client project that required all sale items be pushed to the beginning of the products page. With a little bit of creative coding, and manipulating a few queries, I got it to work. Here we go: [crayon-51991edf716ec/]]]></description>
				<content:encoded><![CDATA[<p>Hey Everybody!</p>
<p>I promised I&#8217;d get a blog post out today, so here goes! Recently, I had a client project that required all sale items be pushed to the beginning of the products page. With a little bit of creative coding, and manipulating a few queries, I got it to work. Here we go:</p>
<p></p><pre class="crayon-plain-tag">/**
 * Sale Products Up Front 
 */

add_action( 'woocommerce_product_query', 'cur_sale_products_up_front', 10, 2);
add_filter('posts_request', 'cur_modify_products_query', 10, 2);
add_filter('loop_start', 'cur_reorder_sale_items');


function cur_replace_text($startPoint, $endPoint, $newText, $source) {
    $regex = '#('.preg_quote($startPoint).')(.*)('.preg_quote($endPoint).')#si';
    preg_match( $regex, $source, $matches);
    $newText = $newText . $matches[2];
    return preg_replace($regex, '$1'.$newText.'$3', $source);
}

function cur_sale_products_up_front($q, $this) {

    if ( isset($_SESSION['orderby']) &amp;&amp; $_SESSION['orderby'] == 'menu_order' ) :
        $q-&gt;set('meta_key', '_sale_price');
        $q-&gt;set('products_query', 'true');
    endif;
    return $q;
}


function cur_modify_products_query($request, $object){
    if ( ! empty( $object-&gt;query_vars['products_query'] ) &amp;&amp;  isset($_SESSION['orderby']) &amp;&amp; $_SESSION['orderby'] == 'menu_order' ) :
        global $wpdb;
        $new_orderby = $wpdb-&gt;postmeta . '.meta_value+0 desc, ';
        $request = cur_replace_text('ORDER BY ', ' LIMIT', $new_orderby, $request);
    endif;
    return $request;
}

function cur_reorder_sale_items($query){

    if( ! empty( $query-&gt;posts ) &amp;&amp; $query-&gt;query_vars['post_type'] == 'product' ) :

        $posts = &amp;$query-&gt;posts; 
        foreach( $posts as $key =&gt; $post ) :
            $sale_price = get_post_meta($post-&gt;ID,'_sale_price', TRUE);
            if( !empty( $sale_price ) )
                $sale_products[$key] = $sale_price;
        endforeach;

        if( !empty ($sale_products ) ) :
            arsort( $sale_products);

            foreach( $sale_products as $key =&gt; $post ) :
                $sale_products[$key] = $posts[$key];
                unset( $posts[$key] );
                array_unshift( $posts, $sale_products[$key] );
            endforeach;
        endif;

    endif;
    return $query;
}</pre><p></p>
]]></content:encoded>
			<wfw:commentRss>http://fightthecurrent.org/242/gist-woocommerce-sale-items-up-front/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
