<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: WordPress Code: Earlier&#160;Shortcodes</title>
	<atom:link href="http://www.viper007bond.com/2009/11/22/wordpress-code-earlier-shortcodes/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.viper007bond.com/2009/11/22/wordpress-code-earlier-shortcodes/#utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=wordpress-code-earlier-shortcodes</link>
	<description>Random stuff written by Alex Mills</description>
	<lastBuildDate>Fri, 10 Feb 2012 22:17:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-19719</generator>
	<item>
		<title>By: BP Code Snippets 2.0 : finally #BuddyPress 1.5+ ready ! &#187; imath..</title>
		<link>http://www.viper007bond.com/2009/11/22/wordpress-code-earlier-shortcodes/comment-page-1/#comment-235942</link>
		<dc:creator>BP Code Snippets 2.0 : finally #BuddyPress 1.5+ ready ! &#187; imath..</dc:creator>
		<pubDate>Mon, 30 Jan 2012 03:31:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.viper007bond.com/?p=1227#comment-235942</guid>
		<description>[...] &#160;&#160;&#160;* many thanks to Viper007Bond for this trick &#160;&#160;&#160;* http://www.viper007bond.com/2009/11/22/wordpress-code-earlier-shortcodes/ [...]</description>
		<content:encoded><![CDATA[<p>[...] &nbsp;&nbsp;&nbsp;* many thanks to Viper007Bond for this trick &nbsp;&nbsp;&nbsp;* <a href="http://www.viper007bond.com/2009/11/22/wordpress-code-earlier-shortcodes/" rel="nofollow">http://www.viper007bond.com/2009/11/22/wordpress-code-earlier-shortcodes/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wordpress is converting &#38; to &#38; inbetween [code] brackets &#124; SeekPHP.com</title>
		<link>http://www.viper007bond.com/2009/11/22/wordpress-code-earlier-shortcodes/comment-page-1/#comment-234903</link>
		<dc:creator>Wordpress is converting &#38; to &#38; inbetween [code] brackets &#124; SeekPHP.com</dc:creator>
		<pubDate>Thu, 01 Sep 2011 03:03:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.viper007bond.com/?p=1227#comment-234903</guid>
		<description>[...] Source: http://www.viper007bond.com/2009/11/22/wordpress-code-earlier-shortcodes/ [...]</description>
		<content:encoded><![CDATA[<p>[...] Source: <a href="http://www.viper007bond.com/2009/11/22/wordpress-code-earlier-shortcodes/" rel="nofollow">http://www.viper007bond.com/2009/11/22/wordpress-code-earlier-shortcodes/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex (Viper007Bond)</title>
		<link>http://www.viper007bond.com/2009/11/22/wordpress-code-earlier-shortcodes/comment-page-1/#comment-234338</link>
		<dc:creator>Alex (Viper007Bond)</dc:creator>
		<pubDate>Wed, 01 Jun 2011 03:06:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.viper007bond.com/?p=1227#comment-234338</guid>
		<description>That&#039;s certainly one solution, yes. :)</description>
		<content:encoded><![CDATA[<p>That&#8217;s certainly one solution, yes. <img src='http://www.viper007bond.com/wordpress/wp-content/plugins/tango-smilies/tango/face-smile.png' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ciantic</title>
		<link>http://www.viper007bond.com/2009/11/22/wordpress-code-earlier-shortcodes/comment-page-1/#comment-234335</link>
		<dc:creator>Ciantic</dc:creator>
		<pubDate>Tue, 31 May 2011 08:38:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.viper007bond.com/?p=1227#comment-234335</guid>
		<description>I love workarounds, it avoids hassles of patches.

But needless to say, should not we promote Wordpress patch and syntax like:

[code]add_shortcode(&quot;foo&quot;, &quot;foo_shortcode&quot;, 7)[/code]

Where last attribute defines the priority?</description>
		<content:encoded><![CDATA[<p>I love workarounds, it avoids hassles of patches.</p>
<p>But needless to say, should not we promote WordPress patch and syntax like:</p>
<pre class="brush: plain; title: ; notranslate">add_shortcode(&quot;foo&quot;, &quot;foo_shortcode&quot;, 7)</pre>
<p>Where last attribute defines the priority?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Protect Shortcodes from wpautop and the likes - Better WordPress</title>
		<link>http://www.viper007bond.com/2009/11/22/wordpress-code-earlier-shortcodes/comment-page-1/#comment-234163</link>
		<dc:creator>Protect Shortcodes from wpautop and the likes - Better WordPress</dc:creator>
		<pubDate>Sat, 30 Apr 2011 14:01:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.viper007bond.com/?p=1227#comment-234163</guid>
		<description>[...] before priority 10? This approach was introduced by Viper, a well-known WordPress developer, on his blog. I will merge his codes into our codes (with some minor modifications) and now we have this:   [...]</description>
		<content:encoded><![CDATA[<p>[...] before priority 10? This approach was introduced by Viper, a well-known WordPress developer, on his blog. I will merge his codes into our codes (with some minor modifications) and now we have this:   [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lucas</title>
		<link>http://www.viper007bond.com/2009/11/22/wordpress-code-earlier-shortcodes/comment-page-1/#comment-233509</link>
		<dc:creator>Lucas</dc:creator>
		<pubDate>Wed, 22 Dec 2010 21:36:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.viper007bond.com/?p=1227#comment-233509</guid>
		<description>Thank you for this!</description>
		<content:encoded><![CDATA[<p>Thank you for this!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: OddOneOut</title>
		<link>http://www.viper007bond.com/2009/11/22/wordpress-code-earlier-shortcodes/comment-page-1/#comment-233437</link>
		<dc:creator>OddOneOut</dc:creator>
		<pubDate>Mon, 13 Dec 2010 18:53:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.viper007bond.com/?p=1227#comment-233437</guid>
		<description>I&#039;m sorry, forgot to code the codes.

I mean this [code][code]&lt;div&gt;test&lt;/div&gt;[/code] becomes this [code]&lt;/p&gt;&lt;div&gt;test&lt;/div&gt;&lt;p&gt;[/code]</description>
		<content:encoded><![CDATA[<p>I&#8217;m sorry, forgot to code the codes.</p>
<p>I mean this
<pre class="brush: plain; title: ; notranslate">[code]&lt;div&gt;test&lt;/div&gt;</pre>
<p> becomes this
<pre class="brush: plain; title: ; notranslate">&lt;/p&gt;&lt;div&gt;test&lt;/div&gt;&lt;p&gt;</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: OddOneOut</title>
		<link>http://www.viper007bond.com/2009/11/22/wordpress-code-earlier-shortcodes/comment-page-1/#comment-233436</link>
		<dc:creator>OddOneOut</dc:creator>
		<pubDate>Mon, 13 Dec 2010 18:52:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.viper007bond.com/?p=1227#comment-233436</guid>
		<description>Hi, this is a very nice approach. I know this is an old post, but I still want to ask something. You said that &quot;While this can be desirable so that wpautop() doesn’t affect the output of the shortcode (the function is well known for not being perfect)&quot;, but could you please tell me how wpautop can affect the shortcodes? I find wpautop affects the shortcodes even if it is called before. For example, [code]&lt;div&gt;test&lt;/div&gt;[/code] will result in test. P tags are never closed. Now, if wpautop is called after shortcodes, it would just be like this test, which is what we want. 

Do you have any suggestions? Thank you!</description>
		<content:encoded><![CDATA[<p>Hi, this is a very nice approach. I know this is an old post, but I still want to ask something. You said that &#8220;While this can be desirable so that wpautop() doesn’t affect the output of the shortcode (the function is well known for not being perfect)&#8221;, but could you please tell me how wpautop can affect the shortcodes? I find wpautop affects the shortcodes even if it is called before. For example,
<pre class="brush: plain; title: ; notranslate">&lt;div&gt;test&lt;/div&gt;</pre>
<p> will result in test. P tags are never closed. Now, if wpautop is called after shortcodes, it would just be like this test, which is what we want. </p>
<p>Do you have any suggestions? Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Leonard</title>
		<link>http://www.viper007bond.com/2009/11/22/wordpress-code-earlier-shortcodes/comment-page-1/#comment-230542</link>
		<dc:creator>Alex Leonard</dc:creator>
		<pubDate>Fri, 23 Apr 2010 08:52:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.viper007bond.com/?p=1227#comment-230542</guid>
		<description>Hey Viper,

Just came across this post and it totally saved my wrecked head!

Was having issues where WP was inserting p elements in my shortcode content.

I&#039;m trying to make things easier for my brother to put a special offer box on his new website but want to maintain flexibility. This way he can do

[special title=&quot;blah&quot;]
// put some content here, most likely a list
[/special]

Interestingly the only thing that was a little strange was if, in my shortcode function, I placed HTML comments after closing divs (something I do to make it easier to find what&#039;s going on where in my source), I still had WP trying to encapsulate the HTML comments in a p element. When I removed the HTML comments everything worked fine!

Thanks dude.</description>
		<content:encoded><![CDATA[<p>Hey Viper,</p>
<p>Just came across this post and it totally saved my wrecked head!</p>
<p>Was having issues where WP was inserting p elements in my shortcode content.</p>
<p>I&#8217;m trying to make things easier for my brother to put a special offer box on his new website but want to maintain flexibility. This way he can do</p>
<p>[special title="blah"]<br />
// put some content here, most likely a list<br />
[/special]</p>
<p>Interestingly the only thing that was a little strange was if, in my shortcode function, I placed HTML comments after closing divs (something I do to make it easier to find what&#8217;s going on where in my source), I still had WP trying to encapsulate the HTML comments in a p element. When I removed the HTML comments everything worked fine!</p>
<p>Thanks dude.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WordPress Picks [12/13] &#124; Techtites</title>
		<link>http://www.viper007bond.com/2009/11/22/wordpress-code-earlier-shortcodes/comment-page-1/#comment-229216</link>
		<dc:creator>WordPress Picks [12/13] &#124; Techtites</dc:creator>
		<pubDate>Sun, 13 Dec 2009 03:15:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.viper007bond.com/?p=1227#comment-229216</guid>
		<description>[...] Earlier Shortcodes [...]</description>
		<content:encoded><![CDATA[<p>[...] Earlier Shortcodes [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daily Digest for November 29th &#124; More Than Scratch The Surface</title>
		<link>http://www.viper007bond.com/2009/11/22/wordpress-code-earlier-shortcodes/comment-page-1/#comment-229075</link>
		<dc:creator>Daily Digest for November 29th &#124; More Than Scratch The Surface</dc:creator>
		<pubDate>Sun, 29 Nov 2009 13:27:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.viper007bond.com/?p=1227#comment-229075</guid>
		<description>[...] Shared WordPress Code: Earlier Shortcodes « Viper007Bond.com [...]</description>
		<content:encoded><![CDATA[<p>[...] Shared WordPress Code: Earlier Shortcodes « Viper007Bond.com [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Viper007Bond</title>
		<link>http://www.viper007bond.com/2009/11/22/wordpress-code-earlier-shortcodes/comment-page-1/#comment-229046</link>
		<dc:creator>Viper007Bond</dc:creator>
		<pubDate>Thu, 26 Nov 2009 12:09:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.viper007bond.com/?p=1227#comment-229046</guid>
		<description>Rewrote the post to use a better example of why you may want to run earlier shortcodes, namely &lt;code&gt;wptexturize()&lt;/code&gt; wreaking havok on your shortcode contents.</description>
		<content:encoded><![CDATA[<p>Rewrote the post to use a better example of why you may want to run earlier shortcodes, namely <code>wptexturize()</code> wreaking havok on your shortcode contents.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy Clarke</title>
		<link>http://www.viper007bond.com/2009/11/22/wordpress-code-earlier-shortcodes/comment-page-1/#comment-229025</link>
		<dc:creator>Jeremy Clarke</dc:creator>
		<pubDate>Tue, 24 Nov 2009 20:45:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.viper007bond.com/?p=1227#comment-229025</guid>
		<description>Yeah, Aaron knows better than me.  I&#039;m pretty sure that in a real OO type project the trick from your post would be considered felonous, but in WordPress its just an unusual workaround. Don&#039;t let Jacob Santos know about it though! :P</description>
		<content:encoded><![CDATA[<p>Yeah, Aaron knows better than me.  I&#8217;m pretty sure that in a real OO type project the trick from your post would be considered felonous, but in WordPress its just an unusual workaround. Don&#8217;t let Jacob Santos know about it though! <img src='http://www.viper007bond.com/wordpress/wp-content/plugins/tango-smilies/tango/face-raspberry.png' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron D. Campbell</title>
		<link>http://www.viper007bond.com/2009/11/22/wordpress-code-earlier-shortcodes/comment-page-1/#comment-229019</link>
		<dc:creator>Aaron D. Campbell</dc:creator>
		<pubDate>Tue, 24 Nov 2009 13:52:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.viper007bond.com/?p=1227#comment-229019</guid>
		<description>That really depends.  Most of the time a variable like that would be private or protected (although that obviously can&#039;t be done in PHP 4).  Instead there should be methods for manipulating it.</description>
		<content:encoded><![CDATA[<p>That really depends.  Most of the time a variable like that would be private or protected (although that obviously can&#8217;t be done in PHP 4).  Instead there should be methods for manipulating it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Viper007Bond</title>
		<link>http://www.viper007bond.com/2009/11/22/wordpress-code-earlier-shortcodes/comment-page-1/#comment-229003</link>
		<dc:creator>Viper007Bond</dc:creator>
		<pubDate>Tue, 24 Nov 2009 00:21:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.viper007bond.com/?p=1227#comment-229003</guid>
		<description>Even if it was class based, you could just manipulate &lt;code&gt;$classvar-&gt;shortcode_tags&lt;/code&gt; though, right?</description>
		<content:encoded><![CDATA[<p>Even if it was class based, you could just manipulate <code>$classvar-&gt;shortcode_tags</code> though, right?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

