<?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>Ben Word</title>
	<atom:link href="http://benword.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://benword.com</link>
	<description></description>
	<lastBuildDate>Mon, 14 May 2012 01:06:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Roots Theme: One Year Later</title>
		<link>http://benword.com/roots-theme-one-year-later/</link>
		<comments>http://benword.com/roots-theme-one-year-later/#comments</comments>
		<pubDate>Sun, 13 May 2012 22:01:03 +0000</pubDate>
		<dc:creator>Ben Word</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Roots]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://benword.com/?p=75</guid>
		<description><![CDATA[The one year anniversary of the public release of Roots was on 03/28/2012. It was developed and used in-house for a year and 3 months before being released. At the time of writing, Roots has 1,718 watchers, 319 forks, 36 &#8230; <a href="http://benword.com/roots-theme-one-year-later/">Continued</a>]]></description>
			<content:encoded><![CDATA[<p>The one year anniversary of the public release of <a href="http://www.rootstheme.com/">Roots</a> was on <a href="https://github.com/retlehs/roots/commit/8e177235fff0257288845d0a2ee1503c667039b3">03/28/2012</a>. It was developed and used in-house for a year and 3 months before being released.</p>
<p>At the time of writing, Roots has <a href="https://github.com/retlehs/roots">1,718 watchers, 319 forks</a>, <a href="https://github.com/retlehs/roots/graphs/contributors">36 contributors</a>, and is the <a href="https://github.com/languages/PHP/most_watched">8th most popular PHP project on GitHub</a>.</p>
<p>There&#8217;s been 448 issues and 99 pull requests. We&#8217;ve pushed 410 commits. There&#8217;s been 10,644 tweets mentioning the Roots website.</p>
<p>We went from having 0 available translated languages to becoming <a href="www.rootstheme.com/wpml/">fully WPML compatible</a> with support for 18 different languages.</p>
<h2>Project History</h2>
<p>I moved from Dallas, TX to Northern Colorado at the end of 2009 and started a job at a place that is basically a website factory, creating mainly brochure and small-business websites built on WordPress.</p>
<p>I was the third employee and was thrown into a job where they wanted me building sites by modifying WooThemes templates. If you&#8217;ve ever used a WooThemes template you&#8217;d understand that it&#8217;s a huge pain in the ass for a developer to work with. I had worked with WordPress and created WordPress themes in the past and knew that we needed a better work process.</p>
<p>I quickly began maintaining my own starting theme since I was tired of having to re-do the same things each time I started working on a new website (before I left the website factory I was usually creating <b>3 new themes a day</b>).</p>
<h3>Combining the Best</h3>
<p>The first step was taking the Starkers bare-bones theme and integrating Blueprint CSS. I needed to use a grid system on each site I was creating and I always had a personal preference of Blueprint over 960.gs. </p>
<p>The next step was adding <a href="http://html5boilerplate.com/">HTML5 Boilerplate</a>&#8216;s markup (when I first started working on Roots, H5BP was actually called frontend-pro-template and maintained by only <a href="http://paulirish.com/">Paul Irish</a>).</p>
<h3>Public Release</h3>
<p>On 03/28/2011 I released Roots to the public and emailed a bunch of WordPress bloggers about it. I had zero expectations about the release since there was already a bunch of public starting themes by that point, but my coworkers insisted that Roots was going to &#8220;blow up&#8221; &#8211; I blew off the thought&#8230;</p>
<h4>Traffic Spikes</h4>
<ul class="unstyled">
<li>03/29/2011 &#8211; HTML5 Boilerplate <a href="https://twitter.com/#!/h5bp/statuses/52799913892909057">tweeted about Roots</a> (500 visits)</li>
<li>04/02/2011 &#8211; Smashing Magazine sent out a Facebook update about Roots (710 visits)</li>
<li>04/03/2011 &#8211; Smashing Magazine <a href="https://twitter.com/#!/smashingmag/statuses/54646060458590208">tweeted about Roots</a> (2,047 visits)</li>
<li>04/12/2011 &#8211; Smashing Magazine sent out a <a href="http://www.smashingmagazine.com/smashing-newsletter-issue-31/">newsletter</a> that mentioned Roots (2,602 visits)</li>
<li>04/18/2011 &#8211; Smashing Magazine mentioned Roots in a <a href="http://smashingmagazine.com/2011/04/18/powerful-new-css-techniques-and-tools/">blog post</a> (2,071 visits)</li>
<li>06/13/2011 &#8211; Mashable mentioned Roots in a <a href="http://mashable.com/2011/06/13/boilerplates-templates-dev/">blog post</a> (829 visits)</li>
<li>09/15/2011 &#8211; LaFermeDuWeb (French) mentioned Roots in a <a href="http://www.lafermeduweb.net/billet/roots-un-theme-framework-pour-wordpress-en-html5-et-css3-1190.html">blog post</a> (888 visits)</li>
<li>01/24/2012 &#8211; Web Resources Depot mentioned Roots in a <a href="http://webresourcesdepot.com/34-free-wordpress-theme-frameworks-and-starter-themes-with-a-comparison-chart/">blog post</a> (1,151 visits)</li>
<li>02/08/2012 &#8211; Smashing Magazine mentioned Roots in a <a href="http://wp.smashingmagazine.com/2012/02/08/wordpress-theme-design-and-development-trends-for-2012/">blog post</a> (1,318 visits)</li>
<li>03/22/2012 &#8211; Smashing Magazine mentioned Roots in a <a href="http://wp.smashingmagazine.com/2012/03/22/useful-wordpress-tools-themes-plugins/">blog post</a> (5k+ visits)</li>
</ul>
<ul class="unstyled">
<li>Speckyboy&#8217;s <a href="http://speckyboy.com/2011/04/25/10-html5-ready-blank-bare-bones-and-naked-themes-for-wordpress/">blog post</a> about Roots has sent over 8,000 visits</li>
<li>Smashing Magazine is responsible for at least 20,000 visits</li>
</li>
</ul>
<h4>GitHub Traffic (04/01/2012)</h4>
<ul class="thumbnails">
<li class="span8">
<div class="thumbnail">
      <img src="/img/github-traffic-2012-04.png" alt="">
    </div>
</li>
</ul>
<h3>Major Changes</h3>
<h4>Adding CSS Frameworks</h4>
<p>Shortly after the public release, <a href="https://github.com/johnraz/">John Liuti</a> submitted a pull request to add 960.gs integration along with Blueprint CSS. Then came the 1140px Grid. Then came Adapt.js &#038; LESS. Then came Bootstrap &#038; Foundation.</p>
<h4>Removing CSS Frameworks except Bootstrap</h4>
<p>We made the decision in February 2012 to remove all frameworks except for Bootstrap from Twitter since the codebase was becoming a bit ridiculous due to all the different CSS frameworks.</p>
<h2>What I&#8217;ve Learned</h2>
<ul>
<li>Roots helped me get a new day-job only two weeks after releasing it</li>
<li><a href="http://github.com/">GitHub</a> is really, really, really, really awesome</li>
<li>People hate bugs</li>
<li>People are lazy and almost never troubleshoot</li>
<li>Most bugs come from root relative URLs and installs in subfolders</li>
<li>WordPress has too many bugs in Trac that have been forgotten (even if there&#8217;s a working patch) that would help out everybody if they could get pushed through</li>
</ul>
<p>We&#8217;re always fighting against WordPress with the clean URLs &amp; root relative URLs features. There&#8217;s also so many different types of installs, from subfolders to different core file locations, to network setups and child themes.</p>
<p>The most stable way to use Roots (with clean URLs &amp; root relative URLs) has always been in root web directory.</p>
<h2>Where We&#8217;re Headed</h2>
<p>We want to <a href="https://github.com/retlehs/roots/issues/230">simplify the template files</a>, do further re-organization &amp; add <a href="https://github.com/retlehs/roots/issues/264">better documentation</a>. We&#8217;re also going to re-add better support for <a href="http://www.rootstheme.com/gravityforms/">Gravity Forms</a> within Bootstrap.</p>
<p><b>Thanks for all the support!</b> </p>
<div class="row">
<div class="span4">
<p><a href="https://github.com/retlehs/roots" class="btn">Watch and contribute to Roots on GitHub</a></p>
</div>
<div class="span4">
<p><a class="btn" href="/support/"><i class="icon-star"></i> Purchase a support block for Roots Theme</a></p>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://benword.com/roots-theme-one-year-later/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Hide The Fact That You&#8217;re Using WordPress</title>
		<link>http://benword.com/how-to-hide-that-youre-using-wordpress/</link>
		<comments>http://benword.com/how-to-hide-that-youre-using-wordpress/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 15:00:17 +0000</pubDate>
		<dc:creator>Ben Word</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Roots]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://benword.com/?p=57</guid>
		<description><![CDATA[Updated on May 13th, 2012 In the Roots Theme we&#8217;re taking several steps to ensure that a visitor to your website won&#8217;t know that you&#8217;re using WordPress: Cleaning up the output of wp_head and removing the generator from RSS feeds &#8230; <a href="http://benword.com/how-to-hide-that-youre-using-wordpress/">Continued</a>]]></description>
			<content:encoded><![CDATA[<div class="alert alert-info"><b>Updated on May 13th, 2012</b></div>
<p>In the <a href="http://www.rootstheme.com/">Roots Theme</a> we&#8217;re taking several steps to ensure that a visitor to your website won&#8217;t know that you&#8217;re using WordPress:</p>
<ol>
<li>Cleaning up the output of <code>wp_head</code> and removing the generator from RSS feeds</li>
<li>Hiding <code>/wp-content/</code> by rewriting static theme assets (CSS, JS, and images), rewriting the plugins directory, and also changing the location of WordPress uploads</li>
<li>Cleaning up the output of navigation menus with a <a href="http://codex.wordpress.org/Function_Reference/Walker_Class">custom walker</a></li>
<li>Bonus: root relative URLs</li>
</ol>
<h2>Cleaning up the output of <b>wp_head</b></h2>
<p>You&#8217;re probably used to viewing the source of your WordPress site and seeing some not-so-pretty code:</p>
<pre class="prettyprint">
&lt;!DOCTYPE html&gt;
&lt;!--[if IE 6]&gt;
&lt;html id="ie6" dir="ltr" lang="en-US"&gt;
&lt;![endif]--&gt;
&lt;!--[if IE 7]&gt;
&lt;html id="ie7" dir="ltr" lang="en-US"&gt;
&lt;![endif]--&gt;
&lt;!--[if IE 8]&gt;
&lt;html id="ie8" dir="ltr" lang="en-US"&gt;
&lt;![endif]--&gt;
&lt;!--[if !(IE 6) | !(IE 7) | !(IE 8)  ]&gt;&lt;!--&gt;
&lt;html dir="ltr" lang="en-US"&gt;
&lt;!--&lt;![endif]--&gt;
&lt;head&gt;
&lt;meta charset="UTF-8" /&gt;
&lt;meta name="viewport" content="width=device-width" /&gt;
&lt;title&gt;Home | Example | Just another WordPress site&lt;/title&gt;
&lt;link rel="profile" href="http://gmpg.org/xfn/11" /&gt;
&lt;link rel="stylesheet" type="text/css" media="all" href="http://example.com/wp-content/themes/twentyeleven/style.css" /&gt;
&lt;link rel="pingback" href="http://example.com/xmlrpc.php" /&gt;
&lt;!--[if lt IE 9]&gt;
&lt;script src="http://example.com/wp-content/themes/twentyeleven/js/html5.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;![endif]--&gt;

&lt;link rel="alternate" type="application/rss+xml" title="Example &raquo; Feed" href="http://example.com/feed/" /&gt;
&lt;link rel="alternate" type="application/rss+xml" title="Example &raquo; Comments Feed" href="http://example.com/comments/feed/" /&gt;
&lt;link rel="alternate" type="application/rss+xml" title="Example &raquo; Home Comments Feed" href="http://example.com/home/feed/" /&gt;
&lt;script type='text/javascript' src='http://example.com/wp-includes/js/l10n.js?ver=20101110'&gt;&lt;/script&gt;
&lt;script type='text/javascript' src='http://example.com/wp-includes/js/comment-reply.js?ver=20090102'&gt;&lt;/script&gt;
&lt;link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://example.com/xmlrpc.php?rsd" /&gt;
&lt;link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://example.comwp-includes/wlwmanifest.xml" /&gt;
&lt;meta name="generator" content="WordPress 3.2.1" /&gt;
&lt;/head&gt;
</pre>
<p>WordPress&#8217;s tagline is &#8220;Code is Poetry&#8221; but usually after taking a quick look at the output of the default theme you might think otherwise. It&#8217;s probably much worse once you&#8217;ve activated some plugins which likely enqueue CSS and scripts all over the place.</p>
<p>If you look at the output of a default Roots theme setup then you&#8217;re going to be looking at almost an exact match of <a href="http://html5boilerplate.com/">HTML5 Boilerplate&#8217;s</a>: </p>
<pre class="prettyprint">
&lt;!doctype html&gt;
&lt;!--[if lt IE 7]&gt; &lt;html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"&gt; &lt;![endif]--&gt;
&lt;!--[if IE 7]&gt;    &lt;html class="no-js lt-ie9 lt-ie8" lang="en"&gt; &lt;![endif]--&gt;
&lt;!--[if IE 8]&gt;    &lt;html class="no-js lt-ie9" lang="en"&gt; &lt;![endif]--&gt;
&lt;!--[if gt IE 8]&gt;&lt;!--&gt; &lt;html class="no-js" lang="en"&gt; &lt;!--&lt;![endif]--&gt;
&lt;head&gt;
  &lt;meta charset="utf-8"&gt;

  &lt;title&gt;Example Site&lt;/title&gt;

  &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;

  &lt;script src="/js/vendor/modernizr-2.5.3.min.js"&gt;&lt;/script&gt;

  &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;window.jQuery || document.write('&lt;script src="/js/vendor/jquery-1.7.2.min.js"&gt;&lt;\/script&gt;')&lt;/script&gt;

  &lt;link rel="alternate" type="application/rss+xml" title="Example Feed" href="http://example.com/feed/"&gt;
  &lt;link rel="stylesheet" href="/css/bootstrap.css"&gt;
  &lt;link rel="stylesheet" href="/css/bootstrap-responsive.css"&gt;
  &lt;link rel="stylesheet" href="/css/app.css"&gt;
  &lt;script type='text/javascript' src='/js/plugins.js'&gt;&lt;/script&gt;
  &lt;script type='text/javascript' src='/js/main.js'&gt;&lt;/script&gt;

  &lt;link rel="canonical" href="http://example.com/"&gt;
&lt;/head&gt;
</pre>
<p>Here&#8217;s what we do to clean up <code>wp_head</code>:</p>
<h3>Remove all unnecessary functions</h3>
<pre class="prettyprint">
remove_action('wp_head', 'feed_links', 2);
remove_action('wp_head', 'feed_links_extra', 3);
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'index_rel_link');
remove_action('wp_head', 'parent_post_rel_link', 10, 0);
remove_action('wp_head', 'start_post_rel_link', 10, 0);
remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
remove_action('wp_head', 'wp_generator');
remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0);
</pre>
<h3>Remove unnecessary CSS</h3>
<pre class="prettyprint">
// remove CSS from recent comments widget
function roots_remove_recent_comments_style() {
  global $wp_widget_factory;
  if (isset($wp_widget_factory->widgets['WP_Widget_Recent_Comments'])) {
    remove_action('wp_head', array($wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style'));
  }
}

add_action('wp_head', 'roots_remove_recent_comments_style', 1);

// remove CSS from gallery
function roots_gallery_style($css) {
  return preg_replace("!&lt;style type='text/css'&gt;(.*?)&lt;/style&gt;!s", '', $css);
}

add_filter('gallery_style', 'roots_gallery_style');
</pre>
<h2>Hide /wp-content/</h2>
<h3>Rewrite static theme assets and plugins directory</h3>
<pre class="prettyprint">
// rewrite /wp-content/themes/theme-name/css/ to /css/
// rewrite /wp-content/themes/theme-name/js/  to /js/
// rewrite /wp-content/themes/theme-name/img/ to /img/
// rewrite /wp-content/plugins/ to /plugins/

function roots_flush_rewrites() {
  global $wp_rewrite;
  $wp_rewrite->flush_rules();
}

function roots_add_rewrites($content) {
  $theme_name = next(explode('/themes/', get_stylesheet_directory()));
  global $wp_rewrite;
  $roots_new_non_wp_rules = array(
    'css/(.*)'      => 'wp-content/themes/'. $theme_name . '/css/$1',
    'js/(.*)'       => 'wp-content/themes/'. $theme_name . '/js/$1',
    'img/(.*)'      => 'wp-content/themes/'. $theme_name . '/img/$1',
    'plugins/(.*)'  => 'wp-content/plugins/$1'
  );
  $wp_rewrite->non_wp_rules += $roots_new_non_wp_rules;
}

add_action('admin_init', 'roots_flush_rewrites');

function roots_clean_assets($content) {
    $theme_name = next(explode('/themes/', $content));
    $current_path = '/wp-content/themes/' . $theme_name;
    $new_path = '';
    $content = str_replace($current_path, $new_path, $content);
    return $content;
}

function roots_clean_plugins($content) {
    $current_path = '/wp-content/plugins';
    $new_path = '/plugins';
    $content = str_replace($current_path, $new_path, $content);
    return $content;
}

add_action('generate_rewrite_rules', 'roots_add_rewrites');
if (!is_admin()) {
  add_filter('plugins_url', 'roots_clean_plugins');
  add_filter('bloginfo', 'roots_clean_assets');
  add_filter('stylesheet_directory_uri', 'roots_clean_assets');
  add_filter('template_directory_uri', 'roots_clean_assets');
  add_filter('script_loader_src', 'roots_clean_plugins');
  add_filter('style_loader_src', 'roots_clean_plugins');
}
</pre>
<h3>Change location of WordPress uploads</h3>
<p>Default WordPress settings will have all of your uploads going into <code>/wp-content/uploads/</code> and also organized by date which can be changed in the admin under <b>Settings > Media</b>.</p>
<p>In the Roots theme we&#8217;re using a directory in the root of your WordPress install called <code>/assets/</code> without the date organization by default.</p>
<h2>Cleaning up the output of navigation menus</h2>
<p>Here&#8217;s the clean walker from Roots:</p>
<pre class="prettyprint">
class Roots_Nav_Walker extends Walker_Nav_Menu {
  function check_current($val) {
    return preg_match('/(current-)/', $val);
  }

  function start_el(&#038;$output, $item, $depth, $args) {
    global $wp_query;
    $indent = ($depth) ? str_repeat("\t", $depth) : '';

    $slug = sanitize_title($item->title);
    $id = apply_filters('nav_menu_item_id', 'menu-' . $slug, $item, $args);
    $id = strlen($id) ? '' . esc_attr( $id ) . '' : '';

    $class_names = $value = '';
    $classes = empty($item->classes) ? array() : (array) $item->classes;

    $classes = array_filter($classes, array(&#038;$this, 'check_current'));

    $custom_classes = get_post_meta($item->ID, '_menu_item_classes', true);
    foreach ($custom_classes as $custom_class) {
      $classes[] = $custom_class;
    }

    $class_names = join(' ', apply_filters('nav_menu_css_class', array_filter($classes), $item, $args));
    $class_names = $class_names ? ' class="' . $id . ' ' . esc_attr($class_names) . '"' : ' class="' . $id . '"';

    $output .= $indent . '
<li' . $class_names . '>';

    $attributes  = ! empty($item->attr_title) ? ' title="'  . esc_attr($item->attr_title) .'"' : '';
    $attributes .= ! empty($item->target)     ? ' target="' . esc_attr($item->target    ) .'"' : '';
    $attributes .= ! empty($item->xfn)        ? ' rel="'    . esc_attr($item->xfn       ) .'"' : '';
    $attributes .= ! empty($item->url)        ? ' href="'   . esc_attr($item->url       ) .'"' : '';

    $item_output = $args->before;
    $item_output .= '<a'. $attributes .'>';
    $item_output .= $args->link_before . apply_filters('the_title', $item->title, $item->ID) . $args->link_after;
    $item_output .= '</a>';
    $item_output .= $args->after;

    $output .= apply_filters('walker_nav_menu_start_el', $item_output, $item, $depth, $args);
  }
}
</pre>
<p>To use the custom walker you&#8217;ll need to modify the call to your menu in your theme files:</p>
<pre class="prettyprint">
&lt;?php wp_nav_menu(array('theme_location' => 'primary_navigation', 'walker' => new roots_nav_walker())); ?&gt;
</pre>
<p>Now the output of your navigation menus will look like:</p>
<pre class="prettyprint">
&lt;nav id="nav-main" role="navigation"&gt;
  &lt;ul id="menu-primary-navigation" class="menu"&gt;
    &lt;li class="menu-home current-menu-item"&gt;&lt;a href="/"&gt;Home&lt;/a&gt;&lt;/li&gt;
    &lt;li class="menu-sample-page"&gt;&lt;a href="/sample-page/"&gt;Sample Page&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/nav&gt;
</pre>
<h2>Root relative URLs in WordPress</h2>
<p>After implementing the code below into your theme you&#8217;ll notice that instead of seeing <code>http://example.com/</code> all over the place you&#8217;ll see mostly just <code>/</code>.</p>
<pre class="prettyprint">
function roots_root_relative_url($input) {
  $output = preg_replace_callback(
    '!(https?://[^/|"]+)([^"]+)?!',
    create_function(
      '$matches',
      // if full URL is site_url, return a slash for relative root
      'if (isset($matches[0]) &#038;&#038; $matches[0] === site_url()) { return "/";' .
      // if domain is equal to site_url, then make URL relative
      '} elseif (isset($matches[0]) &#038;&#038; strpos($matches[0], site_url()) !== false) { return $matches[2];' .
      // if domain is not equal to site_url, do not make external link relative
      '} else { return $matches[0]; };'
    ),
    $input
  );
  return $output;
}

// workaround to remove the duplicate subfolder in the src of JS/CSS tags
// example: /subfolder/subfolder/css/style.css
function roots_fix_duplicate_subfolder_urls($input) {
  $output = roots_root_relative_url($input);
  preg_match_all('!([^/]+)/([^/]+)!', $output, $matches);
  if (isset($matches[1]) &#038;&#038; isset($matches[2])) {
    if ($matches[1][0] === $matches[2][0]) {
      $output = substr($output, strlen($matches[1][0]) + 1);
    }
  }
  return $output;
}

if (!is_admin() &#038;&#038; !in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php'))) {
  add_filter('bloginfo_url', 'roots_root_relative_url');
  add_filter('theme_root_uri', 'roots_root_relative_url');
  add_filter('stylesheet_directory_uri', 'roots_root_relative_url');
  add_filter('template_directory_uri', 'roots_root_relative_url');
  add_filter('script_loader_src', 'roots_fix_duplicate_subfolder_urls');
  add_filter('style_loader_src', 'roots_fix_duplicate_subfolder_urls');
  add_filter('plugins_url', 'roots_root_relative_url');
  add_filter('the_permalink', 'roots_root_relative_url');
  add_filter('wp_list_pages', 'roots_root_relative_url');
  add_filter('wp_list_categories', 'roots_root_relative_url');
  add_filter('wp_nav_menu', 'roots_root_relative_url');
  add_filter('the_content_more_link', 'roots_root_relative_url');
  add_filter('the_tags', 'roots_root_relative_url');
  add_filter('get_pagenum_link', 'roots_root_relative_url');
  add_filter('get_comment_link', 'roots_root_relative_url');
  add_filter('month_link', 'roots_root_relative_url');
  add_filter('day_link', 'roots_root_relative_url');
  add_filter('year_link', 'roots_root_relative_url');
  add_filter('tag_link', 'roots_root_relative_url');
  add_filter('the_author_posts_link', 'roots_root_relative_url');
}

// remove root relative URLs on any attachments in the feed
function roots_root_relative_attachment_urls() {
  $roots_options = roots_get_theme_options();
  if (!is_feed() &#038;&#038; $roots_options['root_relative_urls']) {
    add_filter('wp_get_attachment_url', 'roots_root_relative_url');
    add_filter('wp_get_attachment_link', 'roots_root_relative_url');
  }
}

add_action('pre_get_posts', 'roots_root_relative_attachment_urls');
</pre>
<h5>Thanks</h5>
<p>Huge thanks to <a href="http://terrordome.ca/">Scott Walkinshaw</a> for many of the code examples above and to all of the other <a href="https://github.com/retlehs/roots/contributors">Roots contributors</a>.</p>
<p><a href="https://github.com/retlehs/roots" class="btn btn-large">Watch and contribute to Roots on GitHub</a></p>
]]></content:encoded>
			<wfw:commentRss>http://benword.com/how-to-hide-that-youre-using-wordpress/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Introducing Roots, a WordPress starting theme</title>
		<link>http://benword.com/introducing-roots/</link>
		<comments>http://benword.com/introducing-roots/#comments</comments>
		<pubDate>Tue, 29 Mar 2011 01:02:16 +0000</pubDate>
		<dc:creator>Ben Word</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Roots]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://asdf.benword.com/?p=27</guid>
		<description><![CDATA[Roots is a starting theme based on HTML5 Boilerplate, Blueprint CSS and Starkers with some very unique features. Roots is delete-key friendly just like HTML5 Boilerplate, simply remove anything you don’t need. Roots will allow you to rapidly create brochure &#8230; <a href="http://benword.com/introducing-roots/">Continued</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.rootstheme.com/"><img src="/img/roots-preview.jpg" alt="" class="pull-right"></a>Roots is a starting theme based on <a href="http://html5boilerplate.com/">HTML5 Boilerplate</a>, <a href="http://www.blueprintcss.org/">Blueprint CSS</a> and <a href="http://starkerstheme.com/">Starkers</a> with some very unique features. Roots is delete-key friendly just like HTML5 Boilerplate, simply remove anything you don’t need. Roots will allow you to rapidly create brochure sites and blogs.</p>
<p>Visit the <a href="http://www.rootstheme.com/">Roots Theme</a> site to learn more or head over to <a  href="https://github.com/retlehs/roots">Roots on GitHub</a> for an immediate download.</p>
]]></content:encoded>
			<wfw:commentRss>http://benword.com/introducing-roots/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>add_editor_style not working?</title>
		<link>http://benword.com/add_editor_style-not-working/</link>
		<comments>http://benword.com/add_editor_style-not-working/#comments</comments>
		<pubDate>Sat, 19 Mar 2011 00:12:26 +0000</pubDate>
		<dc:creator>Ben Word</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://asdf.benword.com/?p=18</guid>
		<description><![CDATA[add_editor_style tells WordPress to let you use editor-style.css in your theme directory to control the styling of TinyMCE&#8217;s editor. You can run into a problem where you&#8217;ll be updating editor-style.css but you don&#8217;t see any of the changes while refreshing &#8230; <a href="http://benword.com/add_editor_style-not-working/">Continued</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://codex.wordpress.org/Function_Reference/add_editor_style" title="callback for custom TinyMCE editor stylesheets">add_editor_style</a> tells WordPress to let you use <code>editor-style.css</code> in your theme directory to control the styling of TinyMCE&#8217;s editor. You can run into a problem where you&#8217;ll be updating <code>editor-style.css</code> but you don&#8217;t see any of the changes while refreshing the editor page. This is because of the way <a href="http://tinymce.moxiecode.com/wiki.php/Configuration:content_css">browsers cache TinyMCE&#8217;s content_css</a>.</p>
<p>Here&#8217;s a quick fix for your <code>functions.php</code>:</p>
<pre class="prettyprint">
    // add time() to the end of editor-style.css so that you'll always see the latest version
    add_editor_style('editor-style.css?' . time());
</pre>
]]></content:encoded>
			<wfw:commentRss>http://benword.com/add_editor_style-not-working/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

