<?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>sillybean.net</title>
	<atom:link href="http://sillybean.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://sillybean.net</link>
	<description>reading, writing, web design, and the intersections thereof</description>
	<lastBuildDate>Tue, 16 Mar 2010 02:06:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Wordle tells the story on the health care debate</title>
		<link>http://sillybean.net/elsewhere/wordle-tells-the-story-on-the-health-care-debate/</link>
		<comments>http://sillybean.net/elsewhere/wordle-tells-the-story-on-the-health-care-debate/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 02:06:12 +0000</pubDate>
		<dc:creator>Stephanie</dc:creator>
				<category><![CDATA[Elsewhere]]></category>

		<guid isPermaLink="false">http://sillybean.net/elsewhere/wordle-tells-the-story-on-the-health-care-debate/</guid>
		<description><![CDATA[<p><a href="http://www.fivethirtyeight.com/2010/03/two-pictures-tell-story-on-health-care.html">Wordle tells the story on the health care debate</a> pro-reform: &#8220;People need insurance.&#8221; Anti-reform: &#8220;Government costs people money.&#8221; Yep, that&#8217;s about the size of it.</p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.fivethirtyeight.com/2010/03/two-pictures-tell-story-on-health-care.html">Wordle tells the story on the health care debate</a> pro-reform: &#8220;People need insurance.&#8221; Anti-reform: &#8220;Government costs people money.&#8221; Yep, that&#8217;s about the size of it.</p>]]></content:encoded>
			<wfw:commentRss>http://sillybean.net/elsewhere/wordle-tells-the-story-on-the-health-care-debate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Standards for E-books</title>
		<link>http://sillybean.net/elsewhere/web-standards-for-e-books/</link>
		<comments>http://sillybean.net/elsewhere/web-standards-for-e-books/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 18:48:36 +0000</pubDate>
		<dc:creator>Stephanie</dc:creator>
				<category><![CDATA[Elsewhere]]></category>

		<guid isPermaLink="false">http://sillybean.net/elsewhere/web-standards-for-e-books/</guid>
		<description><![CDATA[<p><a href="http://www.alistapart.com/articles/ebookstandards/">Web Standards for E-books</a> &#8212; Joe Clark is always worth reading, but in this article he&#8217;s tackling the intersection of my two professions. Excellent stuff.</p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.alistapart.com/articles/ebookstandards/">Web Standards for E-books</a> &#8212; Joe Clark is always worth reading, but in this article he&#8217;s tackling the intersection of my two professions. Excellent stuff.</p>]]></content:encoded>
			<wfw:commentRss>http://sillybean.net/elsewhere/web-standards-for-e-books/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Intro to urban fantasy</title>
		<link>http://sillybean.net/elsewhere/intro-to-urban-fantasy/</link>
		<comments>http://sillybean.net/elsewhere/intro-to-urban-fantasy/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 17:50:26 +0000</pubDate>
		<dc:creator>Stephanie</dc:creator>
				<category><![CDATA[Elsewhere]]></category>

		<guid isPermaLink="false">http://sillybean.net/?p=2789</guid>
		<description><![CDATA[<p>They get points off for staring the article with, &#8220;Since ancient times,&#8221; but if you need to hand someone an intro reading list for urban fantasy, you could do a lot worse than <a href="http://tinyurl.com/6quk7r">Library Journal&#8217;s list</a>. My other quibble?&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>They get points off for staring the article with, &#8220;Since ancient times,&#8221; but if you need to hand someone an intro reading list for urban fantasy, you could do a lot worse than <a href="http://tinyurl.com/6quk7r">Library Journal&#8217;s list</a>. My other quibble? I would have starred <em>Bitten</em>.</p>]]></content:encoded>
			<wfw:commentRss>http://sillybean.net/elsewhere/intro-to-urban-fantasy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating roles</title>
		<link>http://sillybean.net/wordpress/users-and-roles/creating-roles/</link>
		<comments>http://sillybean.net/wordpress/users-and-roles/creating-roles/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 15:07:32 +0000</pubDate>
		<dc:creator>Stephanie</dc:creator>
				<category><![CDATA[Users and Roles]]></category>
		<category><![CDATA[capabilities]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[permissions]]></category>
		<category><![CDATA[Privacy]]></category>

		<guid isPermaLink="false">http://wp-as-cms.com/?p=210</guid>
		<description><![CDATA[<p>Sometimes, rather than adding capabilities to an existing role, you need to create a whole new role. The code to do so is relatively easy. Again, place these lines in your theme&#8217;s <code>functions.php</code> file:<span id="more-2721"></span></p>



<pre class="brush: php;">&#60;?php
// Create</pre><p>&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>Sometimes, rather than adding capabilities to an existing role, you need to create a whole new role. The code to do so is relatively easy. Again, place these lines in your theme&#8217;s <code>functions.php</code> file:<span id="more-2721"></span></p>



<pre class="brush: php;">&lt;?php
// Create
add_role('privatereader', 'Private Reader', array(
            'read' =&gt; 1,
            'level_0' =&gt; 1,
            'read_private_pages' =&gt; 1,
            'read_private_posts' =&gt; 1,
        ));
?&gt;</pre>



<p>The <code>add_role</code> function requires three arguments: the role&#8217;s name (for internal use), the display name, and an array of the role&#8217;s capabilities.  (See <a href="http://codex.wordpress.org/Roles_and_Capabilities">the Codex page on Roles and Capabilities</a> for a complete list of the capabilities in WordPress.) Here, we&#8217;ve given our role the same two capabilities a subscriber starts out with, &#8216;read&#8217; and &#8216;level_0.&#8217; (The level_n capabilities exist for backward compatibility with very early versions of WordPress, which used a 1-10 scale instead of named roles.) Then we&#8217;ve added the two roles relating to private content.</p>

<p>If you create or edit a user now, you should see the new Private Reader role as an option.</p>

<p>If we wanted to modify our new role, we&#8217;d use <a href="http://sillybean.net/users-and-roles/changing-roles-capabilities/">the same code we used to change capabilities before</a>, but but we&#8217;d change the <code>get_role</code> function&#8217;s argument to our new role&#8217;s internal name.</p>



<pre class="brush: php;">&lt;?php
// remove ability to read private pages
$PrivateRole = get_role('privatereader');
$PrivateRole -&gt; remove_cap('read_private_pages');
?&gt;</pre>



<p>Need to remove the role? That&#8217;s easy:</p>



<pre class="brush: php;">&lt;?php
remove_role('privatereader');
?&gt;</pre>



<h3>That&#8217;s nice, but now what?</h3>

<p>In this example, it makes sense to create a new role only if you wanted to keep the subscriber role as-is; otherwise; it was simpler to just <a href="http://sillybean.net/users-and-roles/changing-roles-capabilities/">modify the subscriber role</a>.</p>

<p>When <em>would</em> it make sense to create a new role?</p>

<p>Let&#8217;s imagine a new scenario. You&#8217;re building a large site, and you, the programmer, are sharing responsibilities with a graphic designer. You want to give your designer complete control over the content and theme design, but you don&#8217;t want him editing other users, adding plugins, or importing content from other sites.</p>

<p>We could create a whole new role and enumerate every capability we want the designer to have, as we did above for the private reader, but this role will be similar to the administrator&#8217;s, and that&#8217;s <a href="http://codex.wordpress.org/Roles_and_Capabilities#Administrator">a lot of capabilities</a>! Instead, we&#8217;ll duplicate the admin role and remove the eight or nine capabilities we don&#8217;t want the designer to have.</p>

<h3>Creating a designer role</h3>



<pre class="brush: php;">
&lt;?php
$admin = get_role('administrator');

// get_role returns an object.
// We want the capabilities piece, which is an array.
$caps = $admin-&gt;capabilities;

// Remove the stuff we don't want in the new role.
unset($caps['activate_plugins']);
unset($caps['edit_plugins']);
unset($caps['update_plugins']);
unset($caps['delete_plugins']);
unset($caps['install_plugins']);
unset($caps['edit_users']);
unset($caps['delete_users']);
unset($caps['create_users']);
unset($caps['import']);

// Add the new role.
add_role('designer', 'Designer', $caps);
?&gt;
</pre>



<p>And that&#8217;s that!</p>

<p>Note that WordPress&#8217;s admin menus and screens don&#8217;t always behave exactly as you&#8217;d expect. In this case, even though we&#8217;ve removed all capabilities involving plugins, the designer will still be able to access the Plugins &rarr; Add New screen, search for plugins, and install them &#8212; but s/he won&#8217;t be able to activate the new plugin, or see the list of installed plugins.</p>

<p>The user/role structure is due for an overhaul in version 3.1; hopefully these menu glitches will be addressed then.</p>

<h3>Managing Roles with Plugins</h3>

<p>If you&#8217;d rather click tickyboxes than write all this code, Justin Tadlock&#8217;s <a href="http://justintadlock.com/archives/2009/09/17/members-wordpress-plugin">Members plugin</a> provides an elegant user interface for everything I&#8217;ve shown here. It also has some extra features related to private content.</p>]]></content:encoded>
			<wfw:commentRss>http://sillybean.net/wordpress/users-and-roles/creating-roles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>snowmg!</title>
		<link>http://sillybean.net/life/snowmg/</link>
		<comments>http://sillybean.net/life/snowmg/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 20:57:54 +0000</pubDate>
		<dc:creator>Stephanie</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://sillybean.net/?p=2772</guid>
		<description><![CDATA[<p><a href="http://sillybean.net/wp-content/uploads/2010/02/snow.jpg"><img src="http://sillybean.net/wp-content/uploads/2010/02/snow.jpg" alt="" title="snow" width="295" height="281" class="alignright size-full wp-image-2773" /></a></p>

<p>How rare is snow here? I&#8217;d never seen this glyph on the weather widget, let&#8217;s put it that way.</p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://sillybean.net/wp-content/uploads/2010/02/snow.jpg"><img src="http://sillybean.net/wp-content/uploads/2010/02/snow.jpg" alt="" title="snow" width="295" height="281" class="alignright size-full wp-image-2773" /></a></p>

<p>How rare is snow here? I&#8217;d never seen this glyph on the weather widget, let&#8217;s put it that way.</p>]]></content:encoded>
			<wfw:commentRss>http://sillybean.net/life/snowmg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>preserving HTML</title>
		<link>http://sillybean.net/wordpress/metadata/preserving-html/</link>
		<comments>http://sillybean.net/wordpress/metadata/preserving-html/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 10:46:56 +0000</pubDate>
		<dc:creator>Stephanie</dc:creator>
				<category><![CDATA[Metadata]]></category>
		<category><![CDATA[Users and Roles]]></category>
		<category><![CDATA[bio]]></category>
		<category><![CDATA[biography]]></category>
		<category><![CDATA[categories]]></category>
		<category><![CDATA[descriptions]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[rich text]]></category>
		<category><![CDATA[tags]]></category>
		<category><![CDATA[taxonomy]]></category>

		<guid isPermaLink="false">http://wordpress-as-cms.com/?p=195</guid>
		<description><![CDATA[How to preserve HTML entered into user bios, category/tag/taxonomy descriptions, and excerpts.]]></description>
			<content:encoded><![CDATA[<p>Several of the description fields in WordPress will strip any <span class="caps">HTML </span>entered into them. You can preserve them with a little work, though.</p>

<h4>User Descriptions</h4>

<p>The biography field on the user profile page accepts a limited number of <span class="caps">HTML </span>tags &#8212; the same ones allowed in comments. If you need to create richer biographies for your users, you can preserve <span class="caps">HTML </span>by adding the following to your <code>functions.php</code> file:<span id="more-2720"></span></p>



<pre class="brush: php;">
remove_filter( 'pre_user_description', 'wp_filter_kses' );
</pre>



<h4>Category, Tag, and Taxonomy Descriptions</h4>

<p>The taxonomy description fields also prevent you from entering some <span class="caps">HTML.</span> To keep it, add this to <code>functions.php</code>:</p>



<pre class="brush: php;">
remove_filter( 'pre_term_description', 'wp_filter_kses' );
remove_filter( 'term_description', 'wp_kses_data' );
</pre>



<h4>Excerpts</h4>

<p>As I&#8217;ve <a href="http://sillybean.net/posts-and-pages/take-control-of-your-excerpts/">mentioned before</a>, there is no easy way to filter the excerpt function to preserve <span class="caps">HTML</span>; the <span class="caps">PHP </span><code>strip_tags()</code> function is part of <code>the_excerpt()</code>, and there&#8217;s no getting around it without recreating the function altogether<sup class="footnote"><a href="#fn1">1</a></sup>. That&#8217;s exactly what the <a href="http://wordpress.org/extend/plugins/advanced-excerpt/">Advanced Excerpt plugin</a> does. Download and activate it, and your <span class="caps">HTML </span>stays right where you put it.</p>

<p class="footnote" id="fn1"><sup>1</sup> If you&#8217;d like to see the_excerpt changed to allow <span class="caps">HTML, </span>add a comment on <a href="http://core.trac.wordpress.org/ticket/12084">this bug report</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://sillybean.net/wordpress/metadata/preserving-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>moving the furniture</title>
		<link>http://sillybean.net/web-design/blogging/moving-the-furniture/</link>
		<comments>http://sillybean.net/web-design/blogging/moving-the-furniture/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 19:47:16 +0000</pubDate>
		<dc:creator>Stephanie</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://sillybean.net/?p=2734</guid>
		<description><![CDATA[<p>If you follow me on <span class="caps">RSS </span>or LiveJournal, you probably just saw a flood of new posts. Sorry about that! When I started wordpress-as-cms.com last summer, I meant it to be a place where I could write about all&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>If you follow me on <span class="caps">RSS </span>or LiveJournal, you probably just saw a flood of new posts. Sorry about that! When I started wordpress-as-cms.com last summer, I meant it to be a place where I could write about all my geeky technical WordPress stuff without boring you all here. But, since I&#8217;ve written so many plugins, and because <a href="/books/beginning-wordpress/">my WordPress book</a> is coming out soon, it made less and less sense to separate the two. </p>

<p>So, I just imported a bunch of stuff, and I&#8217;m now cleaning it up (the code from those posts <em>really</em> doesn&#8217;t play nicely with Textile, which might force me to abandon it at last, as much as I love it), and in a little while I&#8217;ll shut down the other site and redirect everything here.</p>

<p>Sorry about the mess. </p>]]></content:encoded>
			<wfw:commentRss>http://sillybean.net/web-design/blogging/moving-the-furniture/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Esquire has an amazing profile of Roger Ebert</title>
		<link>http://sillybean.net/elsewhere/esquire-has-an-amazing-profile-of-roger-ebert/</link>
		<comments>http://sillybean.net/elsewhere/esquire-has-an-amazing-profile-of-roger-ebert/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 21:15:46 +0000</pubDate>
		<dc:creator>Stephanie</dc:creator>
				<category><![CDATA[Elsewhere]]></category>

		<guid isPermaLink="false">http://sillybean.net/2010/02/esquire-has-an-amazing-profile-of-roger-ebert/</guid>
		<description><![CDATA[<p><a href="http://www.esquire.com/print-this/roger-ebert-0310">Esquire has an amazing profile of Roger Ebert</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.esquire.com/print-this/roger-ebert-0310">Esquire has an amazing profile of Roger Ebert</a></p>]]></content:encoded>
			<wfw:commentRss>http://sillybean.net/elsewhere/esquire-has-an-amazing-profile-of-roger-ebert/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>using shortcodes everywhere</title>
		<link>http://sillybean.net/wordpress/content/using-shortcodes-everywhere/</link>
		<comments>http://sillybean.net/wordpress/content/using-shortcodes-everywhere/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 16:48:19 +0000</pubDate>
		<dc:creator>Stephanie</dc:creator>
				<category><![CDATA[Content]]></category>
		<category><![CDATA[Metadata]]></category>
		<category><![CDATA[bio]]></category>
		<category><![CDATA[biography]]></category>
		<category><![CDATA[categories]]></category>
		<category><![CDATA[descriptions]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[rich text]]></category>
		<category><![CDATA[shortcodes]]></category>
		<category><![CDATA[tags]]></category>
		<category><![CDATA[taxonomy]]></category>
		<category><![CDATA[template tags]]></category>

		<guid isPermaLink="false">http://wp-as-cms.com/?p=242</guid>
		<description><![CDATA[How to use shortcodes in widgets, excerpts, comments, theme files, user descriptions, and category/tag/taxonomy descriptions.]]></description>
			<content:encoded><![CDATA[<p>At the moment, shortcodes in WordPress are processed only in post/page content. You can use them in lots of other places, though, if you enable them for each field you want. Here&#8217;s how to use shortcodes in widgets, excerpts, comments, theme files, user descriptions, and category/tag/taxonomy descriptions.<span id="more-2719"></span></p>

<h3>Text Widgets</h3>

<p>It&#8217;s easy to make shortcodes work in text widgets. Just add the following to your <code>functions.php</code> file:</p>



<pre class="brush: php;">
add_filter( 'widget_text', 'shortcode_unautop');
add_filter( 'widget_text', 'do_shortcode');
</pre>



<p>The second line is the one that makes the shortcodes work, but you&#8217;ll want to include both. If you check &#8220;add paragraphs automatically&#8221; on the widget, WordPress will apply the <code>autop</code> filter &#8212; the one that turns your line breaks into paragraph and break tags. If a shortcode is on its own line, it would normally get wrapped in a paragraph tag. The first line prevents that from happening.</p>

<h3>Template Files</h3>

<p>You can use shortcodes right in your theme! Use the <code>do_shortcode()</code> function, where the argument is a string that contains a shortcode.</p>

<p>For example, to print the output of the shortcode [foo] in a theme, add this to the file:</p>



<pre class="brush: php;">
&lt;?php do_shortcode('[foo]'); ?&gt;
</pre>



<p>The <code>do_shortcode()</code> function accepts any text as its input. If the string contains a shortcode, that code will get processed. So, for example, you could manually process your post content for shortcodes like this:</p>



<pre class="brush: php;">
&lt;?php
$content = get_the_content();
echo do_shortcode($content);
?&gt;
</pre>



<h3>Comments</h3>

<p>Do you trust your commenters enough to allow them to use shortcodes? This goes into <code>functions.php</code>:</p>



<pre class="brush: php;">
add_filter( 'comment_text', 'shortcode_unautop');
add_filter( 'comment_text', 'do_shortcode' );
</pre>



<h3>Excerpts</h3>

<p>To enable shortcodes in excerpts, add these lines to your <code>functions.php</code> file:</p>



<pre class="brush: php;">
add_filter( 'the_excerpt', 'shortcode_unautop');
add_filter( 'the_excerpt', 'do_shortcode');
</pre>



<h3>User Descriptions</h3>

<p>There is no filter (as far as I know) for the user description, so in order to display the description with shortcodes, you&#8217;ll need to fetch the description string, then pass it to the <code>do_shortcode()</code> function. This would go into your theme file:</p>



<pre class="brush: php;">
&lt;?php
// $user_id = 3;
$userdata = get_userdata($user_id);
echo do_shortcode($userdata-&gt;description);
?&gt;
</pre>



<h3>Category, Tag, and Taxonomy Descriptions</h3>

<p>These descriptions can be filtered, so the code for your <code>functions.php</code> file is simple:</p>



<pre class="brush: php;">
add_filter( 'term_description', 'shortcode_unautop');
add_filter( 'term_description', 'do_shortcode' );
</pre>]]></content:encoded>
			<wfw:commentRss>http://sillybean.net/wordpress/content/using-shortcodes-everywhere/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A letter to the personal care industry</title>
		<link>http://sillybean.net/life/a-letter-to-the-personal-care-industry/</link>
		<comments>http://sillybean.net/life/a-letter-to-the-personal-care-industry/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 21:35:57 +0000</pubDate>
		<dc:creator>Stephanie</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://sillybean.net/?p=2669</guid>
		<description><![CDATA[<p>Could you try to sell us products that don&#8217;t <a href="http://yuki-onna.livejournal.com/563882.html">infantilize us and give us cancer</a>?</p>

<p>nolove,<br />
Women</p>]]></description>
			<content:encoded><![CDATA[<p>Could you try to sell us products that don&#8217;t <a href="http://yuki-onna.livejournal.com/563882.html">infantilize us and give us cancer</a>?</p>

<p>nolove,<br />
Women</p>]]></content:encoded>
			<wfw:commentRss>http://sillybean.net/life/a-letter-to-the-personal-care-industry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.456 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-03-17 17:56:22 -->
