<?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>Jeremy Felt</title>
	<atom:link href="http://jeremyfelt.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jeremyfelt.com</link>
	<description></description>
	<lastBuildDate>Mon, 14 May 2012 09:27:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-beta4-20800</generator>
		<item>
		<title>Filters In Youtube Favorite Video Posts</title>
		<link>http://jeremyfelt.com/wordpress/2012/05/12/filters-in-youtube-favorite-video-posts/</link>
		<comments>http://jeremyfelt.com/wordpress/2012/05/12/filters-in-youtube-favorite-video-posts/#comments</comments>
		<pubDate>Sun, 13 May 2012 02:00:56 +0000</pubDate>
		<dc:creator>jeremyfelt</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://jeremyfelt.com/?p=5920</guid>
		<description><![CDATA[Today&#8217;s update of Youtube Favorite Video Posts includes a couple filters that can be used to modify the post title and content whenever new items are saved. Here are a few snippets that show the filters in action. These can be added to your theme&#8217;s functions.php file, or, as is often applicable, to the child theme you have created [...]]]></description>
			<content:encoded><![CDATA[<p>Today&#8217;s update of Youtube Favorite Video Posts includes a couple filters that can be used to modify the post title and content whenever new items are saved. Here are a few snippets that show the filters in action. These can be added to your theme&#8217;s <em>functions.php</em> file, or, as is often applicable, to the <a title="WordPress Child Themes" href="http://codex.wordpress.org/Child_Themes">child theme</a> you have created from your primary theme of choice.</p>
<div id="gist-2669822" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="cp">&lt;?php</span></div><div class='line' id='LC2'><span class="cm">/* A brief overview of filters that are now available in Youtube Favorite Video Posts.</span></div><div class='line' id='LC3'><span class="cm"> *</span></div><div class='line' id='LC4'><span class="cm"> * These allow easy overriding of the default post title and content before the</span></div><div class='line' id='LC5'><span class="cm"> * new post is created.</span></div><div class='line' id='LC6'><span class="cm"> */</span></div><div class='line' id='LC7'><br/></div><div class='line' id='LC8'><span class="nx">add_filter</span><span class="p">(</span> <span class="s1">&#39;yfvp_new_video_embed_code&#39;</span><span class="p">,</span> <span class="s1">&#39;myprefix_change_yfvp_post_content&#39;</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="mi">1</span> <span class="p">);</span></div><div class='line' id='LC9'><span class="cm">/* Adds a little nonsense introduction to the video before embedding the </span></div><div class='line' id='LC10'><span class="cm"> * iframe that was provided by default */</span></div><div class='line' id='LC11'><span class="k">function</span> <span class="nf">myprefix_change_yfvp_post_content</span><span class="p">(</span> <span class="nv">$video_embed_code</span><span class="p">,</span> <span class="nv">$video_token</span> <span class="p">)</span> <span class="p">{</span></div><div class='line' id='LC12'><br/></div><div class='line' id='LC13'>	<span class="nv">$new_content</span> <span class="o">=</span> <span class="s1">&#39;My video post includes the token - &#39;</span> <span class="o">.</span> <span class="nv">$video_token</span> <span class="o">.</span> <span class="s1">&#39; - before embedding!&#39;</span><span class="p">;</span></div><div class='line' id='LC14'>	<span class="nv">$new_content</span> <span class="o">.=</span> <span class="nv">$video_embed_code</span><span class="p">;</span></div><div class='line' id='LC15'><br/></div><div class='line' id='LC16'>	<span class="k">return</span> <span class="nv">$new_content</span><span class="p">;</span></div><div class='line' id='LC17'><span class="p">}</span></div><div class='line' id='LC18'><br/></div><div class='line' id='LC19'><span class="nx">add_filter</span><span class="p">(</span> <span class="s1">&#39;yfvp_new_video_item_title&#39;</span> <span class="s1">&#39;myprefix_change_yfvp_post_title&#39;</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="mi">1</span> <span class="p">);</span></div><div class='line' id='LC20'><span class="cm">/* Changes the default title from Youtube */</span></div><div class='line' id='LC21'><span class="k">function</span> <span class="nf">myprefix_change_yfvp_post_title</span><span class="p">(</span> <span class="nv">$current_title</span> <span class="p">)</span> <span class="p">{</span></div><div class='line' id='LC22'>	<span class="k">return</span> <span class="s1">&#39;This is a video: &#39;</span> <span class="o">.</span> <span class="nv">$current_title</span><span class="p">;</span></div><div class='line' id='LC23'><span class="p">}</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/2669822/ce372f4d9333b1916794a36baf37810725f27181/gistfile1.aw" style="float:right;">view raw</a>
            <a href="https://gist.github.com/2669822#file_gistfile1.aw" style="float:right;margin-right:10px;color:#666">gistfile1.aw</a>
            <a href="https://gist.github.com/2669822">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<p>Youtube Favorite Video Posts can be <a title="Youtube Favorite Video Posts" href="http://wordpress.org/extend/plugins/youtube-favorite-video-posts/">downloaded through the WordPress plugin repository</a>. More info can be found through the <a title="Youtube Favorite Video Posts - Project page" href="http://jeremyfelt.com/wordpress/plugins/youtube-favorite-video-posts/">overall project status page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jeremyfelt.com/wordpress/2012/05/12/filters-in-youtube-favorite-video-posts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exploring Intention When Registering Custom Post Types In WordPress</title>
		<link>http://jeremyfelt.com/wordpress/2012/05/07/exploring-intention-when-registering-custom-post-types-in-wordpress/</link>
		<comments>http://jeremyfelt.com/wordpress/2012/05/07/exploring-intention-when-registering-custom-post-types-in-wordpress/#comments</comments>
		<pubDate>Mon, 07 May 2012 00:39:44 +0000</pubDate>
		<dc:creator>jeremyfelt</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[exclude_from_search]]></category>
		<category><![CDATA[get_posts]]></category>
		<category><![CDATA[parse_request]]></category>
		<category><![CDATA[public]]></category>
		<category><![CDATA[publicly_queryable]]></category>
		<category><![CDATA[query_var]]></category>
		<category><![CDATA[register_post_type]]></category>

		<guid isPermaLink="false">http://jeremyfelt.com/?p=5891</guid>
		<description><![CDATA[I&#8217;ve often found myself confused when trying to determine the intent of the optional arguments available to the WordPress function register_post_type(). While many are fairly obvious, there were a few that needed some better definition. I set off this weekend to update the register_post_type() Codex article as well as the associated inline docs in post.php. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve often found myself confused when trying to determine the intent of the optional arguments available to the WordPress function register_post_type(). While many are fairly obvious, there were a few that needed some better definition. I set off this weekend to update the <a title="WordPress Function Reference - register_post_type()" href="http://codex.wordpress.org/Function_Reference/register_post_type">register_post_type() Codex article</a> as well as <a title="A submitted patch for register_post_type() inline docs" href="http://core.trac.wordpress.org/attachment/ticket/20622/20622.diff">the associated inline docs</a> in post.php.</p>
<p>As part of that refresh, I&#8217;m hoping to use this write up as a way to further explore what&#8217;s actually going on behind the scenes.</p>
<p>To serve as a very brief guide, here is an example use of register_post_type(). After, I&#8217;ll dive into a few of the arguments to expand on the intent involved with each.:</p>
<div id="gist-2625099" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="cp">&lt;?php</span></div><div class='line' id='LC2'><span class="cm">/*</span></div><div class='line' id='LC3'><span class="cm"> * Creates a custom post type with the key &#39;prefix_post_type&#39;, with a basic</span></div><div class='line' id='LC4'><span class="cm"> * configuration that provides for public access on the front end and admin.</span></div><div class='line' id='LC5'><span class="cm"> *</span></div><div class='line' id='LC6'><span class="cm">*/</span></div><div class='line' id='LC7'><span class="nx">add_action</span><span class="p">(</span> <span class="s1">&#39;init&#39;</span><span class="p">,</span> <span class="s1">&#39;prefix_register_post_type&#39;</span> <span class="p">);</span></div><div class='line' id='LC8'><span class="k">function</span> <span class="nf">prefix_register_post_types</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC9'>	<span class="nv">$public_pt_args</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span></div><div class='line' id='LC10'>		<span class="s1">&#39;label&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;My Post Type&#39;</span><span class="p">,</span></div><div class='line' id='LC11'>		<span class="s1">&#39;public&#39;</span> <span class="o">=&gt;</span> <span class="k">true</span><span class="p">,</span></div><div class='line' id='LC12'>		<span class="s1">&#39;publicly_queryable&#39;</span> <span class="o">=&gt;</span> <span class="k">true</span><span class="p">,</span></div><div class='line' id='LC13'>		<span class="s1">&#39;exclude_from_search&#39;</span> <span class="o">=&gt;</span> <span class="k">false</span><span class="p">,</span></div><div class='line' id='LC14'>		<span class="s1">&#39;show_ui&#39;</span> <span class="o">=&gt;</span> <span class="k">true</span><span class="p">,</span></div><div class='line' id='LC15'>		<span class="s1">&#39;show_in_menu&#39;</span> <span class="o">=&gt;</span> <span class="k">true</span><span class="p">,</span></div><div class='line' id='LC16'>		<span class="s1">&#39;has_archive&#39;</span> <span class="o">=&gt;</span> <span class="k">true</span><span class="p">,</span></div><div class='line' id='LC17'>		<span class="s1">&#39;rewrite&#39;</span> <span class="o">=&gt;</span> <span class="k">true</span><span class="p">,</span></div><div class='line' id='LC18'>		<span class="s1">&#39;query_var&#39;</span> <span class="o">=&gt;</span> <span class="k">true</span><span class="p">,</span></div><div class='line' id='LC19'>	<span class="p">);</span></div><div class='line' id='LC20'>	<span class="nx">register_post_type</span><span class="p">(</span> <span class="s1">&#39;prefix_post_type&#39;</span><span class="p">,</span> <span class="nv">$public_pt_args</span> <span class="p">);</span></div><div class='line' id='LC21'><span class="p">}</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/2625099/0fc0d535cd5b0d89437ded8b3c6e50ee657b9312/gistfile1.aw" style="float:right;">view raw</a>
            <a href="https://gist.github.com/2625099#file_gistfile1.aw" style="float:right;margin-right:10px;color:#666">gistfile1.aw</a>
            <a href="https://gist.github.com/2625099">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<h3>&#8216;public&#8217;</h3>
<p><em><strong>Implies overall intent for the post type.</strong></em></p>
<p>The word public in this case should not be confused with front-end. There is no hard definition, and a post type can be public while remaining hidden from any front-end view. The setting for public is used for admin, front-end and XML-RPC requests and should not be underestimated.</p>
<p>If no additional arguments are set, the value for public also helps to trigger values for publicly_queryable, exclude_from_search, show_ui, and show_in_nav_menus as such:</p>
<div id="gist-2625156" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="cp">&lt;?php</span></div><div class='line' id='LC2'><span class="cm">/* If public is not specified when registering a custom post type, false</span></div><div class='line' id='LC3'><span class="cm"> * is used by default. */</span></div><div class='line' id='LC4'><span class="nv">$non_public_pt_args</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span> <span class="s1">&#39;public&#39;</span> <span class="o">=&gt;</span> <span class="k">false</span> <span class="p">);</span></div><div class='line' id='LC5'><br/></div><div class='line' id='LC6'><span class="cm">/* The above is the same as specifying the following. */</span></div><div class='line' id='LC7'><span class="nv">$non_public_pt_args</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span></div><div class='line' id='LC8'>	<span class="s1">&#39;public&#39;</span> <span class="o">=&gt;</span> <span class="k">false</span><span class="p">,</span></div><div class='line' id='LC9'>	<span class="s1">&#39;publicly_queryable&#39;</span> <span class="o">=&gt;</span> <span class="k">false</span><span class="p">,</span></div><div class='line' id='LC10'>	<span class="s1">&#39;exclude_from_search&#39;</span> <span class="o">=&gt;</span> <span class="k">true</span><span class="p">,</span></div><div class='line' id='LC11'>	<span class="s1">&#39;show_ui&#39;</span> <span class="o">=&gt;</span> <span class="k">false</span><span class="p">,</span></div><div class='line' id='LC12'>	<span class="s1">&#39;show_in_nav_menus&#39;</span> <span class="o">=&gt;</span> <span class="k">false</span><span class="p">,</span></div><div class='line' id='LC13'><span class="p">);</span></div><div class='line' id='LC14'><br/></div><div class='line' id='LC15'><span class="cm">/* Setting public to true results in a different set of values */</span></div><div class='line' id='LC16'><span class="nv">$public_pt_args</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span> <span class="s1">&#39;public&#39;</span> <span class="o">=&gt;</span> <span class="k">true</span> <span class="p">);</span></div><div class='line' id='LC17'><br/></div><div class='line' id='LC18'><span class="cm">/* The above is the same asa specifying the following. */</span></div><div class='line' id='LC19'><span class="nv">$public_pt_args</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span></div><div class='line' id='LC20'>	<span class="s1">&#39;public&#39;</span> <span class="o">=&gt;</span> <span class="k">true</span><span class="p">,</span></div><div class='line' id='LC21'>	<span class="s1">&#39;publicly_queryable&#39;</span> <span class="o">=&gt;</span> <span class="k">true</span><span class="p">,</span></div><div class='line' id='LC22'>	<span class="s1">&#39;exclude_from_search&#39;</span> <span class="o">=&gt;</span> <span class="k">false</span><span class="p">,</span></div><div class='line' id='LC23'>	<span class="s1">&#39;show_ui&#39;</span> <span class="o">=&gt;</span> <span class="k">true</span><span class="p">,</span></div><div class='line' id='LC24'>	<span class="s1">&#39;show_in_nav_menus&#39;</span> <span class="o">=&gt;</span> <span class="k">true</span><span class="p">,</span></div><div class='line' id='LC25'><span class="p">);</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/2625156/684ed866ffb5fb5112b33bc998e0958d2ae378e2/gistfile1.aw" style="float:right;">view raw</a>
            <a href="https://gist.github.com/2625156#file_gistfile1.aw" style="float:right;margin-right:10px;color:#666">gistfile1.aw</a>
            <a href="https://gist.github.com/2625156">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<p>Any easy assumption to make here is that public only triggers other arguments. That is not correct. While other arguments can inherit its value, public is very much an argument on its own.</p>
<h4>How &#8216;public&#8217; is used in WordPress (<em>as of 3.4</em>)</h4>
<ul>
<li>Checked for as &#8216;true&#8217; during redirect_guess_404_permalink() in canonical.php if the &#8216;name&#8217; query var exists without a request for &#8216;post_type&#8217;.</li>
<li>Checked for as &#8216;true&#8217; during wp_link_query() in class-wp-editor.php to provide the list of possible internal links when using WP Editor.</li>
<li>Checked for as &#8216;true&#8217; during _get_last_post_time() in post.php to query for the last posted post object.</li>
<li>Checked for as &#8216;false&#8217; when looking for lost attachments in upload.php to help exclude post types (in addition to attachments) that attachments cannont be attached to.</li>
<li>Checked for as &#8216;true&#8217; during find_posts_div() in template.php to help find posts that attachments can be attached to.</li>
<li>Depended on when using _prepare_post_type() and wp_getPostTypes() in class-wp-xmlrpc-server.php to provide the post type&#8217;s &#8216;public&#8217; status to XML-RPC requests.</li>
<li>Checked for as true during wp_admin_bar_edit_menu() in wp-includes/admin-bar.php to display the &#8216;View Item&#8217; link in the admin bar.
<ul>
<li>The show_ui argument is used for this on the front end.</li>
</ul>
</li>
<li>Checked for as true during redirect_canonical() in canonical.php when trying to redirect based on a valid page, post or attachment ID passed via query_var.</li>
<li>Checked for as false during _update_blog_date_on_post_publish()  and _update_blog_date_on_post_delete() in ms-blogs.php to help decide whether or noth to update a site&#8217;s last updated time in a multisite environment.</li>
<li>Used during edit-form-advanced.php when determining whether to show a sample permalink and the associated Edit, View Post and Get Shortlink buttons.</li>
<li>Used when displaying single rows in class-wp-posts-list-table.php to determine if preview/view links should be shown .</li>
<li><em>list still in progress, feel free to chip in&#8230;</em></li>
</ul>
<h3>&#8216;publicly_queryable&#8217;</h3>
<p><em><strong>Should the post type be queried for on the front-end via parse_request()?</strong></em></p>
<p>This is very much related to what can be seen by a user on the front-end of a WordPress installation. Most URLs associated with a post type will cause a related query_var to be available during parse_request() in order to handle the direction of the page load.</p>
<p>In fact, the only use of publicly_queryable in core code outside of register_post_type() is in class-wp.php as part of parse_request() when the post_type is set as a query var.</p>
<ul>
<li>If $query_var['post_type'] is a string and matches a post_type that is publicly_queryable, it continues.</li>
<li>If $query_var['post_type'] is a string and does not match a publicly_queryable post_type, the $query_var['post_type'] is unset entirely.</li>
<li>If $query_var['post_type'] is an array, it is matched with an array of post types that have publicly_queryable set to true.</li>
</ul>
<p>If not explicitly defined, publicly_queryable inherits the public setting, which is false by default.</p>
<h3>&#8216;exclude_from_search&#8217;</h3>
<p><strong>Should the post type be available to front-end search requests?</strong></p>
<p>This argument is checked for during get_posts() in query.php <strong>only</strong> if the post_type of the query is set to &#8216;any&#8217;. A check is done then for all post types that have &#8216;exclude_from_search&#8217; set to false.</p>
<p>For any of the other conditions, whether multiple post types or single post types are specified, no check is done to see if should be exluded from search. This results in slightly unexpected search behavior, as seen in this <a title="Post type argument test result Gist" href="https://gist.github.com/2625350">document of test results</a>.</p>
<p>If not explicitly defined, exclude_from_search inherits the opposite of the public setting, which results in &#8216;true&#8217; by default.</p>
<h3>&#8216;query_var&#8217;</h3>
<p><strong>What should be used as the query_var key in parse_request()?</strong></p>
<p>This helps control the query_var used when a URL is loaded to be processed by parse_request().</p>
<ul>
<li>If true, a post loaded at site/?{post_type_key}={post-slug} will be successful, as the query_var is set to the post_type key.</li>
<li>If false, a post loaded at site/?{post_type_key}={post-slug} will not be successful, as the query_var is not registered for use.</li>
<li>If a string, such as &#8216;my-cpt-slug&#8217;, is set, a post loaded at site/?my-cpt-slug={post-slug} will be successful.</li>
</ul>
<p>By default, query_var is set to true and the key used to register the post type becomes the query_var string.</p>
<h3>In Progress&#8230;.</h3>
<p>This is very much a work in progress, especially with the settings for public, as its value is used far more in WordPress core than I&#8217;ve been able to find so far. I&#8217;ll be updating this document as I find more examples, and would be happy to include any input. While exploring, I&#8217;ve compiled a horribly formatted document (<a title="register_post_type argument test results" href="https://gist.github.com/2625350">saved as a Gist here</a>) that attempts to provide examples for each combination of some relative arguments.</p>
<p>Fire away!</p>
]]></content:encoded>
			<wfw:commentRss>http://jeremyfelt.com/wordpress/2012/05/07/exploring-intention-when-registering-custom-post-types-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Filters In Automatic Featured Image Posts</title>
		<link>http://jeremyfelt.com/wordpress/2012/04/14/filters-in-automatic-featured-image-posts/</link>
		<comments>http://jeremyfelt.com/wordpress/2012/04/14/filters-in-automatic-featured-image-posts/#comments</comments>
		<pubDate>Sat, 14 Apr 2012 20:08:28 +0000</pubDate>
		<dc:creator>jeremyfelt</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.jeremyfelt.com/?p=5831</guid>
		<description><![CDATA[A feature requested multiple times for Automatic Featured Image Posts is the ability to insert the new image into post content in addition to assigning it as the featured image for the post. I tried a few things to make this work, but there are two primary issues: I hook into the &#8216;add_attachment&#8217; hook in [...]]]></description>
			<content:encoded><![CDATA[<p>A feature requested multiple times for <a title="Automatic Featured Image Posts" href="http://wordpress.org/extend/plugins/automatic-featured-image-posts/">Automatic Featured Image Posts</a> is the ability to insert the new image into post content in addition to assigning it as the featured image for the post.</p>
<p>I tried a few things to make this work, but there are two primary issues: </p>
<ol>
<li>I hook into the &#8216;add_attachment&#8217; hook in WordPress. This runs immediately after an image is uploaded and the attachment data is added to the database. I can grab this data immediately, but only for the full size version of the new image. The thumbnails are crunched in the background and I haven&#8217;t yet found the right way to grab a smaller image for display. This works fine at times, but your site could quickly become bogged down with multiple 2MB files loading on your home page.</li>
<li>If I was able to solve the first issue, it would still be hard to determine what the new post content should look like. Should I only use the medium image? Should it be center aligned? The varieties are fairly endless, where as using the featured image makes the display very flexible. [<a title="WordPress Post Thumbnails (Featured Images)" href="http://codex.wordpress.org/Post_Thumbnails">what are WordPress Post Thumbnails/Featured Images?</a>]</li>
</ol>
<p>So with those in mind, while this request stretches the bounds of the primary purpose for the plugin, it is easy enough to provide filters to allow content to be handled on a custom basis.</p>
<p>With today&#8217;s update for Automatic Featured Image Posts, I&#8217;m adding 3 filters that allow you to easily set the new post title, categories, and content as you upload images. The new image will continue to be attached as the featured image for the post, but this will allow more flexibility for those who want it.</p>
<p>Here are a few snippets that show the filters in action. These can be added to your theme&#8217;s <em>functions.php</em> file, or, as is often applicable, to the <a title="WordPress Child Themes" href="http://codex.wordpress.org/Child_Themes">child theme</a> you have created from your primary theme of choice.</p>
<div id="gist-2387195" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="cp">&lt;?php</span></div><div class='line' id='LC2'><span class="cm">/* A brief overview of filters that are now available in Automatic Featured Image Posts.</span></div><div class='line' id='LC3'><span class="cm"> *</span></div><div class='line' id='LC4'><span class="cm"> * These allow easy overriding of the default post title, categories, and content before</span></div><div class='line' id='LC5'><span class="cm"> * the new post is created, while still maintaining the core priority of the plugin,</span></div><div class='line' id='LC6'><span class="cm"> * which is to add a new post with a featured image assigned to it */</span></div><div class='line' id='LC7'><span class="nx">add_filter</span><span class="p">(</span> <span class="s1">&#39;afip_new_post_title&#39;</span><span class="p">,</span> <span class="s1">&#39;myprefix_change_afip_post_title&#39;</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="mi">2</span> <span class="p">);</span></div><div class='line' id='LC8'><span class="cm">/* Adds &#39;Magic Photo: &#39; to the front of every auto generated post tile from</span></div><div class='line' id='LC9'><span class="cm"> * Automatic Featured Image Posts */</span></div><div class='line' id='LC10'><span class="k">function</span> <span class="nf">myprefix_change_afip_post_title</span><span class="p">(</span> <span class="nv">$post_title</span><span class="p">,</span> <span class="nv">$attachment_id</span> <span class="p">)</span> <span class="p">{</span></div><div class='line' id='LC11'><br/></div><div class='line' id='LC12'>	<span class="k">return</span> <span class="s1">&#39;Magic Photo: &#39;</span> <span class="o">.</span> <span class="nv">$post_title</span><span class="p">;</span></div><div class='line' id='LC13'><br/></div><div class='line' id='LC14'><span class="p">}</span></div><div class='line' id='LC15'><br/></div><div class='line' id='LC16'><span class="nx">add_filter</span><span class="p">(</span> <span class="s1">&#39;afip_new_post_category&#39;</span><span class="p">,</span> <span class="s1">&#39;myprefix_change_afip_post_category&#39;</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="mi">2</span> <span class="p">);</span></div><div class='line' id='LC17'><span class="cm">/* Adds every auto generated post to the category with the slug &#39;photos&#39; */</span></div><div class='line' id='LC18'><span class="k">function</span> <span class="nf">myprefix_change_afip_post_category</span><span class="p">(</span> <span class="nv">$post_category</span><span class="p">,</span> <span class="nv">$attachment_id</span> <span class="p">)</span> <span class="p">{</span></div><div class='line' id='LC19'><br/></div><div class='line' id='LC20'>	<span class="nv">$my_photo_category</span> <span class="o">=</span> <span class="nx">get_category_by_slug</span><span class="p">(</span> <span class="s1">&#39;photos&#39;</span> <span class="p">);</span></div><div class='line' id='LC21'><br/></div><div class='line' id='LC22'>	<span class="k">if</span> <span class="p">(</span> <span class="nb">is_object</span><span class="p">(</span> <span class="nv">$my_photo_category</span> <span class="p">)</span> <span class="p">)</span></div><div class='line' id='LC23'>		<span class="nv">$post_category</span><span class="p">[]</span> <span class="o">=</span> <span class="nv">$my_photo_category</span><span class="o">-&gt;</span><span class="na">term_id</span><span class="p">;</span></div><div class='line' id='LC24'><br/></div><div class='line' id='LC25'>	<span class="k">return</span> <span class="nv">$post_category</span><span class="p">;</span></div><div class='line' id='LC26'><br/></div><div class='line' id='LC27'><span class="p">}</span></div><div class='line' id='LC28'><br/></div><div class='line' id='LC29'><span class="nx">add_filter</span><span class="p">(</span> <span class="s1">&#39;afip_new_post_content&#39;</span><span class="p">,</span> <span class="s1">&#39;myprefix_change_afip_post_content&#39;</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="mi">2</span> <span class="p">);</span></div><div class='line' id='LC30'><span class="cm">/* Grabs the image source for the newly created image and inserts it</span></div><div class='line' id='LC31'><span class="cm"> * into the new post content along with a one line paragraph. */</span></div><div class='line' id='LC32'><span class="k">function</span> <span class="nf">myprefix_change_afip_post_content</span><span class="p">(</span> <span class="nv">$post_content</span><span class="p">,</span> <span class="nv">$attachment_id</span> <span class="p">)</span> <span class="p">{</span></div><div class='line' id='LC33'><br/></div><div class='line' id='LC34'>	<span class="nv">$my_uploaded_image</span> <span class="o">=</span> <span class="nx">wp_get_attachment_image_src</span><span class="p">(</span> <span class="nv">$attachment_id</span> <span class="p">);</span></div><div class='line' id='LC35'><br/></div><div class='line' id='LC36'>	<span class="nv">$post_content</span> <span class="o">=</span> <span class="s1">&#39;&lt;p&gt;This is my new uploaded image....&lt;/p&gt;&#39;</span><span class="p">;</span></div><div class='line' id='LC37'>	<span class="nv">$post_content</span> <span class="o">.=</span> <span class="s1">&#39;&lt;img src=&quot;&#39;</span> <span class="o">.</span> <span class="nv">$my_uploaded_image</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">.</span> <span class="s1">&#39;&quot;&gt;&#39;</span><span class="p">;</span></div><div class='line' id='LC38'><br/></div><div class='line' id='LC39'>	<span class="k">return</span> <span class="nv">$post_content</span><span class="p">;</span></div><div class='line' id='LC40'><br/></div><div class='line' id='LC41'><span class="p">}</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/2387195/e432c702b0197ef36278658cf362063d1c8a8767/functions.php" style="float:right;">view raw</a>
            <a href="https://gist.github.com/2387195#file_functions.php" style="float:right;margin-right:10px;color:#666">functions.php</a>
            <a href="https://gist.github.com/2387195">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<p>Automatic Featured Image Posts can be <a title="Automatic Featured Image Posts" href="http://wordpress.org/extend/plugins/automatic-featured-image-posts/">downloaded through the WordPress repository</a>. More info can be found through the <a title="Automatic Featured Image Posts" href="http://www.jeremyfelt.com/wordpress/plugins/automatic-featured-image-posts/">overall project status page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jeremyfelt.com/wordpress/2012/04/14/filters-in-automatic-featured-image-posts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Is Not Caching Your Custom Feed</title>
		<link>http://jeremyfelt.com/wordpress/2012/03/17/wordpress-is-not-caching-your-custom-feed/</link>
		<comments>http://jeremyfelt.com/wordpress/2012/03/17/wordpress-is-not-caching-your-custom-feed/#comments</comments>
		<pubDate>Sat, 17 Mar 2012 23:51:21 +0000</pubDate>
		<dc:creator>jeremyfelt</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.jeremyfelt.com/?p=5825</guid>
		<description><![CDATA[So. You&#8217;ve hooked into the appropriate core actions, loaded a template file and added a quick echo to test the beginnings of your feed. You bring up a browser, load the feed, and are satisfied when you see the output you were expecting. Now, you code out the rest of the feed. Put in a query, [...]]]></description>
			<content:encoded><![CDATA[<p>So.</p>
<p>You&#8217;ve hooked into the appropriate core actions, loaded a template file and added a quick echo to test the beginnings of your feed. You bring up a browser, load the feed, and are satisfied when you see the output you were expecting.</p>
<p>Now, you code out the rest of the feed. Put in a query, loop over the results and mold your output. Sweet.</p>
<p>Refresh the feed in your browser and bam &#8211; same test output from before.</p>
<p>What the?</p>
<p>You hit Google and start searching. One place tells you to delete your transients, another tells you to define your own Magpie cache settings. All of them were written in 2007.</p>
<p>And then you run into this page, which dutifully informs you that WordPress is not caching your custom feed.</p>
<p>You are. In your browser. Clear the cache.</p>
]]></content:encoded>
			<wfw:commentRss>http://jeremyfelt.com/wordpress/2012/03/17/wordpress-is-not-caching-your-custom-feed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Where To?</title>
		<link>http://jeremyfelt.com/photographs/2012/01/21/where-to/</link>
		<comments>http://jeremyfelt.com/photographs/2012/01/21/where-to/#comments</comments>
		<pubDate>Sun, 22 Jan 2012 06:58:49 +0000</pubDate>
		<dc:creator>jeremyfelt</dc:creator>
				<category><![CDATA[Photographs]]></category>

		<guid isPermaLink="false">http://www.jeremyfelt.com/uncategorized/2012/01/21/where-to/</guid>
		<description><![CDATA[[singlepic id=6 w=600 h=450 float=center]]]></description>
			<content:encoded><![CDATA[<p>[singlepic id=6 w=600 h=450 float=center] </p>
]]></content:encoded>
			<wfw:commentRss>http://jeremyfelt.com/photographs/2012/01/21/where-to/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Snow On The Ground In Portland</title>
		<link>http://jeremyfelt.com/photographs/2012/01/18/snow-on-the-ground-in-portland/</link>
		<comments>http://jeremyfelt.com/photographs/2012/01/18/snow-on-the-ground-in-portland/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 02:26:04 +0000</pubDate>
		<dc:creator>jeremyfelt</dc:creator>
				<category><![CDATA[Photographs]]></category>
		<category><![CDATA[portland]]></category>
		<category><![CDATA[snow]]></category>

		<guid isPermaLink="false">http://www.jeremyfelt.com/uncategorized/2012/01/18/snow-on-the-ground-in-portland/</guid>
		<description><![CDATA[The window view last night at 12:30AM. Amazing at how much the sky lit up with the snowfall and the city lights. [singlepic id=5 w=600 h=450 float=left]]]></description>
			<content:encoded><![CDATA[<p>The window view last night at 12:30AM. Amazing at how much the sky lit up with the snowfall and the city lights.</p>
<p>[singlepic id=5 w=600 h=450 float=left] </p>
]]></content:encoded>
			<wfw:commentRss>http://jeremyfelt.com/photographs/2012/01/18/snow-on-the-ground-in-portland/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Washington Park Snow Hike</title>
		<link>http://jeremyfelt.com/photographs/2012/01/15/washington-park-snow-hike/</link>
		<comments>http://jeremyfelt.com/photographs/2012/01/15/washington-park-snow-hike/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 06:20:24 +0000</pubDate>
		<dc:creator>jeremyfelt</dc:creator>
				<category><![CDATA[Photographs]]></category>
		<category><![CDATA[hike]]></category>
		<category><![CDATA[portland]]></category>
		<category><![CDATA[snow]]></category>
		<category><![CDATA[washington park]]></category>

		<guid isPermaLink="false">http://www.jeremyfelt.com/?p=5532</guid>
		<description><![CDATA[Snow made an appearance for a bit in Portland this morning, so we took the opportunity to head up into the hills of Washington Park where it was actually amounting to something. Our walk around Wildwood Trail and its neighbors was gorgeous, with a heavy wet snow falling most of the way. So cool to [...]]]></description>
			<content:encoded><![CDATA[<p>Snow made an appearance for a bit in Portland this morning, so we took the opportunity to head up into the hills of Washington Park where it was actually amounting to something.</p>
<p>Our <a title="Walking Wildwood Trail Through Washington Park" href="http://web.oregon.com/hiking/washington_park.cfm">walk around Wildwood Trail</a> and its neighbors was gorgeous, with a heavy wet snow falling most of the way. So cool to see the green moss and ferns covered with a dusting. Very much different from the snowfall on dead stuff that we grew up with in the Midwest.</p>
<p>[nggallery id=1] </p>
]]></content:encoded>
			<wfw:commentRss>http://jeremyfelt.com/photographs/2012/01/15/washington-park-snow-hike/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A Hedge Against Fury</title>
		<link>http://jeremyfelt.com/review/2012/01/08/a-hedge-against-fury/</link>
		<comments>http://jeremyfelt.com/review/2012/01/08/a-hedge-against-fury/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 22:52:30 +0000</pubDate>
		<dc:creator>jeremyfelt</dc:creator>
				<category><![CDATA[Review]]></category>

		<guid isPermaLink="false">http://www.jeremyfelt.com/?p=5479</guid>
		<description><![CDATA[From Updike&#8217;s Rabbit Redux, as Rabbit adjusts to a bar in which he is entirely out of his element: The presence of any game reassures Rabbit. Where any game is being played a hedge exists against fury. I haven&#8217;t exactly figured out how much that means yet, but it sounds good.]]></description>
			<content:encoded><![CDATA[<p>From Updike&#8217;s <a title="Rabbit Redux on Amazon" href="http://www.amazon.com/gp/product/0449911934/ref=as_li_ss_tl?ie=UTF8&amp;tag=jerfel-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0449911934">Rabbit Redux</a>, as Rabbit adjusts to a bar in which he is entirely out of his element:</p>
<blockquote><p>The presence of any game reassures Rabbit. Where any game is being played a hedge exists against fury.</p></blockquote>
<p>I haven&#8217;t exactly figured out how much that means yet, but it sounds good.</p>
]]></content:encoded>
			<wfw:commentRss>http://jeremyfelt.com/review/2012/01/08/a-hedge-against-fury/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ifttt.com &#8211; Dropbox Photo to WordPress</title>
		<link>http://jeremyfelt.com/technology/2012/01/08/ifttt-dropbox-photo-to-wordpress/</link>
		<comments>http://jeremyfelt.com/technology/2012/01/08/ifttt-dropbox-photo-to-wordpress/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 21:28:34 +0000</pubDate>
		<dc:creator>jeremyfelt</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.jeremyfelt.com/?p=5509</guid>
		<description><![CDATA[This didn&#8217;t work out as perfectly as I wanted, but it&#8217;s still pretty cool. I took this picture from my phone and saved it to my Dropbox folder. Ifttt then grabbed it and created a post in WordPress for me. The biggest problem is that it creates a post using the Dropbox URL for the [...]]]></description>
			<content:encoded><![CDATA[<p>This didn&#8217;t work out as perfectly as I wanted, but it&#8217;s still pretty cool. I took this picture from my phone and saved it to my Dropbox folder. <a title="Ifttt" href="http://ifttt.com">Ifttt</a> then grabbed it and created a post in <a title="WordPress.org" href="http://www.wordpress.org">WordPress</a> for me. The biggest problem is that it creates a post using the Dropbox URL for the photo, not by uploading the photo to my WordPress install and creating something (with thumnail options) from that. I think a plugin may be in order rather than <a title="Ifttt" href="http://ifttt.com">Ifttt</a>, but still pretty cool!</p>
<p><img src="http://dl.dropbox.com/u/1008788/C360_2012-01-08-11-55-32.jpg" alt="" /></p>
<div></div>
]]></content:encoded>
			<wfw:commentRss>http://jeremyfelt.com/technology/2012/01/08/ifttt-dropbox-photo-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Skype And Apache</title>
		<link>http://jeremyfelt.com/technology/2012/01/08/skype-and-apache/</link>
		<comments>http://jeremyfelt.com/technology/2012/01/08/skype-and-apache/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 19:36:10 +0000</pubDate>
		<dc:creator>jeremyfelt</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.jeremyfelt.com/?p=5501</guid>
		<description><![CDATA[If you all of a sudden have trouble starting Apache on your Windows system, either through XAMPP or otherwise, and you also have Skype installed, this screenshot is for you. I&#8217;m not entirely sure why Skype would choose to tie up port 80 by default, as that configuration has to be so unlikely for the [...]]]></description>
			<content:encoded><![CDATA[<p>If you all of a sudden have trouble starting Apache on your Windows system, either through XAMPP or otherwise, and you also have Skype installed, this screenshot is for you.</p>
<p><a href="http://jeremyfelt.com/files/2012/01/skype-disable-port-80.png"><img class="aligncenter size-full wp-image-5502" src="http://jeremyfelt.com/files/2012/01/skype-disable-port-80.png" alt="Disable port 80 in Skype" width="714" height="612" /></a></p>
<p>I&#8217;m not entirely sure why Skype would choose to tie up port 80 by default, as that configuration has to be so unlikely for the average user, but they do. So if you&#8217;re having trouble starting Apache, uncheck that little box first.</p>
<p class="post_script">I wouldn&#8217;t normally create a post for this, but if you don&#8217;t get the search terms right, you run into a bunch of &#8216;tutorials&#8217; that take forever to just say the words &#8216;Skype uses port 80&#8242;. Sometimes all you need is a little screenshot. So now this exists, and it can now provide more juice to other similarly helpful posts such as <a title="Apache and Skype" href="http://ottopress.com/2010/quickie-apache-and-skype/">Apache and Skype</a> from Otto, which I ran into after being amazed at the other several hundred word tutorials.</p>
]]></content:encoded>
			<wfw:commentRss>http://jeremyfelt.com/technology/2012/01/08/skype-and-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

