<?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>Full Refresh</title>
	<atom:link href="http://fullrefresh.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://fullrefresh.com</link>
	<description></description>
	<lastBuildDate>Fri, 09 Mar 2012 05:29:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>WP Custom Post Types UI and &#8220;Insert Into Post&#8221;</title>
		<link>http://fullrefresh.com/2012/03/09/wp-custom-post-types-ui-and-insert-into-post/</link>
		<comments>http://fullrefresh.com/2012/03/09/wp-custom-post-types-ui-and-insert-into-post/#comments</comments>
		<pubDate>Fri, 09 Mar 2012 05:27:53 +0000</pubDate>
		<dc:creator>bryandavis</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://fullrefresh.com/?p=691</guid>
		<description><![CDATA[On a WordPress site I was working on recently I ran into an issue that had me stumped. Namely on some, but not all, of the Custom Post Types I was using, when using the Add Media dialog to upload &#8230; <a href="http://fullrefresh.com/2012/03/09/wp-custom-post-types-ui-and-insert-into-post/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>On a WordPress site I was working on recently I ran into an issue that had me stumped. Namely on some, but not all, of the Custom Post Types I was using, when using the Add Media dialog to upload and insert media to an entry, the &#8220;Insert Into Post&#8221; button was missing!</p>
<p>I googled, as one does, and similar reports led me to realise that the problem occurs when you generate a custom Edit screen for a particular post type. Specifically, if you don&#8217;t allow support for the Editor in your post type setup and then place it manually in a custom meta box. This project was a new build in WP3.3+, and so the Editor is rendered with the new <code>wp_editor()</code> function, with the ID set to &#8216;content&#8217; so it automatically hooks into the regular save routine and you can display the content using <code>the_content()</code> in your template. In this situation, the media buttons will display perfectly happily, if called, and the Media Uploader works as expected. It&#8217;s just that the &#8220;Insert Into Post&#8221; button is gone. If you add Editor support in the arguments when registering the post type, it appears as expected.</p>
<p>(You may be asking why I want to render the Editor manually, which is a topic for another post. In brief, it made more sense for the content I&#8217;m collecting to have some custom fields rendered before the Editor, and to be able to label and provide some instructions for what should be entered in the Editor. More about that another time&#8230;)</p>
<p>Eventually, I ran across a <a href="http://wordpress.org/support/topic/insert-into-post-button-missing-for-some-picture">helpful post on the WordPress Support Forums</a> with a method for forcing the button to appear:<br />
<code><br />
add_filter( 'get_media_item_args', 'force_send' );</p>
<p>function force_send($args){<br />
$args['send'] = true;<br />
return $args;<br />
}</code></p>
<p>That works as described and I thank &#8216;misternifty&#8217; for it. However, it forces the button to appear in such a way that it also appears when viewing/editing an attachment through the Media Library. That&#8217;s not ideal, mainly because it simply won&#8217;t work, but also because it has the potential to be confusing for the client for whom the site has been built. Fortunately, I hit upon a solution fairly quickly, which only targets the Post Types for which it&#8217;s a problem. This is what I came up with:</p>
<p><code><br />
add_filter( 'get_media_item_args', 'force_send' );</p>
<p>function force_send($args){<br />
$pid = $_GET['post_id'];<br />
if(get_post_type($pid) == '{post type}') {<br />
$args['send'] = true;<br />
}<br />
return $args;<br />
}<br />
</code></p>
<p>I realised that when the Add Media dialog is called from within a post (or other post type), there is a query string sent to <code>media-upload.php</code> in the iframe to attach the uploaded file to the current post object. It takes the form: <code>{your path to WP installation}/wp-admin/media-upload.php?post_id=xxx</code>.</p>
<p>Therefore, what this code does is GET the parent post id from the iframe URL. Then you check if that post has a post type that is missing Editor support and force the button, if so. Et voila, the &#8220;Insert Into Post&#8221; is back in place where it&#8217;s needed.</p>
<p>A longwinded explanation, perhaps, but it will hopefully make it easier to find a solution that stumped both Google and I for too long this afternoon! If you have questions or comments about this approach, comments are open. I look forward to reading what you have to say!</p>
]]></content:encoded>
			<wfw:commentRss>http://fullrefresh.com/2012/03/09/wp-custom-post-types-ui-and-insert-into-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I hate Internet Explorer!</title>
		<link>http://fullrefresh.com/2012/02/13/i-hate-internet-explorer/</link>
		<comments>http://fullrefresh.com/2012/02/13/i-hate-internet-explorer/#comments</comments>
		<pubDate>Mon, 13 Feb 2012 23:12:25 +0000</pubDate>
		<dc:creator>bryandavis</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://fullrefresh.com/?p=688</guid>
		<description><![CDATA[Much of the last two days has been wasted due to recent versions of IE and their peculiarities. Very irritating!]]></description>
			<content:encoded><![CDATA[<p>Much of the last two days has been wasted due to recent versions of IE and their peculiarities. Very irritating!</p>
]]></content:encoded>
			<wfw:commentRss>http://fullrefresh.com/2012/02/13/i-hate-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Now back home in NYC&#8230;</title>
		<link>http://fullrefresh.com/2012/01/24/now-back-home-in-nyc/</link>
		<comments>http://fullrefresh.com/2012/01/24/now-back-home-in-nyc/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 02:32:12 +0000</pubDate>
		<dc:creator>bryandavis</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://fullrefresh.com/?p=685</guid>
		<description><![CDATA[Now back home in NYC and inundated with projects. However, thinking of adding a WordPress plugin to my list too. Any requests?]]></description>
			<content:encoded><![CDATA[<p>Now back home in NYC and inundated with projects. However, thinking of adding a WordPress plugin to my list too. Any requests?</p>
]]></content:encoded>
			<wfw:commentRss>http://fullrefresh.com/2012/01/24/now-back-home-in-nyc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://fullrefresh.com/2012/01/18/678/</link>
		<comments>http://fullrefresh.com/2012/01/18/678/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 02:44:03 +0000</pubDate>
		<dc:creator>bryandavis</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://fullrefresh.com/?p=678</guid>
		<description><![CDATA[You may notice that I&#8217;ve found time to a least spruce up the theme a little; thanks to some fonts from the fine folks at TypeKit and a quick tinker with the TwentyEleven theme&#8217;s CSS. More to come before long, &#8230; <a href="http://fullrefresh.com/2012/01/18/678/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>You may notice that I&#8217;ve found time to a least spruce up the theme a little; thanks to some fonts from the fine folks at TypeKit and a quick tinker with the TwentyEleven theme&#8217;s CSS.</p>
<p>More to come before long, but better than nothing&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://fullrefresh.com/2012/01/18/678/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress for Android rocks!</title>
		<link>http://fullrefresh.com/2012/01/17/wordpress-for-android-rocks/</link>
		<comments>http://fullrefresh.com/2012/01/17/wordpress-for-android-rocks/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 00:15:37 +0000</pubDate>
		<dc:creator>bryandavis</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://fullrefresh.com/?p=668</guid>
		<description><![CDATA[Very impressed by the current version of WP for Android!]]></description>
			<content:encoded><![CDATA[<p>Very impressed by the current version of WP for Android!</p>
]]></content:encoded>
			<wfw:commentRss>http://fullrefresh.com/2012/01/17/wordpress-for-android-rocks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New FullRefresh.com coming soon&#8230;</title>
		<link>http://fullrefresh.com/2012/01/17/new-fullrefresh-com-coming-soon/</link>
		<comments>http://fullrefresh.com/2012/01/17/new-fullrefresh-com-coming-soon/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 00:13:40 +0000</pubDate>
		<dc:creator>bryandavis</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://fullrefresh.com/?p=666</guid>
		<description><![CDATA[You may have noticed that we were offline for a day or two while hosts were being changed. Back now and expecting a design other than the WP default to go live shortly&#8230;]]></description>
			<content:encoded><![CDATA[<p>You may have noticed that we were offline for a day or two while hosts were being changed. Back now and expecting a design other than the WP default to go live shortly&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://fullrefresh.com/2012/01/17/new-fullrefresh-com-coming-soon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://fullrefresh.com/2012/01/16/663/</link>
		<comments>http://fullrefresh.com/2012/01/16/663/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 03:07:19 +0000</pubDate>
		<dc:creator>bryandavis</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://fullrefresh.com/?p=663</guid>
		<description><![CDATA[Starting to tire of this head cold now&#8230;]]></description>
			<content:encoded><![CDATA[<p>Starting to tire of this head cold now&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://fullrefresh.com/2012/01/16/663/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy New Year! (2012 Edition)</title>
		<link>http://fullrefresh.com/2012/01/04/happy-new-year-2012-edition/</link>
		<comments>http://fullrefresh.com/2012/01/04/happy-new-year-2012-edition/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 01:08:58 +0000</pubDate>
		<dc:creator>bryandavis</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://fullrefresh.com/?p=654</guid>
		<description><![CDATA[Not much to report, other than to wish anybody who may be looking in a very Happy New Year! Back to radio silence&#8230;]]></description>
			<content:encoded><![CDATA[<p>Not much to report, other than to wish anybody who may be looking in a very Happy New Year!</p>
<p>Back to radio silence&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://fullrefresh.com/2012/01/04/happy-new-year-2012-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Steve Kuhn launch</title>
		<link>http://fullrefresh.com/2011/12/15/steve-kuhn-launch/</link>
		<comments>http://fullrefresh.com/2011/12/15/steve-kuhn-launch/#comments</comments>
		<pubDate>Thu, 15 Dec 2011 06:52:08 +0000</pubDate>
		<dc:creator>bryandavis</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://fullrefresh.com/?p=652</guid>
		<description><![CDATA[Yet another site launch late this evening. This time, it&#8217;s the turn of pianist Steve Kuhn. Enjoy!]]></description>
			<content:encoded><![CDATA[<p>Yet another site launch late this evening. This time, it&#8217;s the turn of pianist <a href="http://stevekuhnmusic.com" target="_blank">Steve Kuhn</a>. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://fullrefresh.com/2011/12/15/steve-kuhn-launch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 3.3 Editor bug</title>
		<link>http://fullrefresh.com/2011/12/13/wordpress-3-3-editor-bug/</link>
		<comments>http://fullrefresh.com/2011/12/13/wordpress-3-3-editor-bug/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 22:54:28 +0000</pubDate>
		<dc:creator>bryandavis</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[WP 3.3]]></category>

		<guid isPermaLink="false">http://fullrefresh.com/?p=650</guid>
		<description><![CDATA[Time to get a-testing and see which plugin/function is causing a bug I&#8217;m experiencing with the newly released WP 3.3. Namely, I&#8217;m seeing both Visual and HTML Editor toolbars at once when in Visual mode. Weird! It&#8217;s a shame, because &#8230; <a href="http://fullrefresh.com/2011/12/13/wordpress-3-3-editor-bug/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Time to get a-testing and see which plugin/function is causing a bug I&#8217;m experiencing with the newly released WP 3.3. Namely, I&#8217;m seeing both Visual and HTML Editor toolbars at once when in Visual mode. Weird!</p>
<p>It&#8217;s a shame, because otherwise WP 3.3 is rocking!!</p>
]]></content:encoded>
			<wfw:commentRss>http://fullrefresh.com/2011/12/13/wordpress-3-3-editor-bug/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

