<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>WordPress &#8250; Support Topic: apply_filters content in wordpress 2.8</title>
<link>http://wordpress.org/support/</link>
<description>WordPress &#8250; Support Topic: apply_filters content in wordpress 2.8</description>
<language>en</language>
<pubDate>Tue, 24 Nov 2009 02:42:06 +0000</pubDate>

<item>
<title>t31os_ on "apply_filters content in wordpress 2.8"</title>
<link>http://wordpress.org/support/topic/281512#post-1178377</link>
<pubDate>Mon, 17 Aug 2009 23:34:18 +0000</pubDate>
<dc:creator>t31os_</dc:creator>
<guid isPermaLink="false">1178377@http://wordpress.org/support/</guid>
<description>&#60;p&#62;If you're displaying the content after using explode, you're actually invalidating your code...&#60;/p&#62;
&#60;p&#62;You're removing the opening tags and not replacing them.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;echo $q.&#38;#39;&#38;lt;p&#38;gt;&#38;#39;.$number; // Fix missing opening paragraph tags&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I assume the use of explode is so you can split the content up. If that's not really the case and you're just counting the paragraphs then there's easier ways.&#60;/p&#62;
&#60;p&#62;Here's one..&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$paragraphs = explode(&#38;#39;&#38;lt;p&#38;gt;&#38;#39;,$post-&#38;gt;post_content);
$paracount = count($paragraphs); unset($paragraphs);
echo $paracount; unset($paracount);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;If that's not what you're attempting to do then why are you dividing the content up into an array?
&#60;/p&#62;</description>
</item>
<item>
<title>nzahn on "apply_filters content in wordpress 2.8"</title>
<link>http://wordpress.org/support/topic/281512#post-1108452</link>
<pubDate>Thu, 18 Jun 2009 13:49:05 +0000</pubDate>
<dc:creator>nzahn</dc:creator>
<guid isPermaLink="false">1108452@http://wordpress.org/support/</guid>
<description>&#60;p&#62;All right ... solved it; if someone is interested here is the fixed code:&#60;/p&#62;
&#60;p&#62;In the loop&#60;br /&#62;
&#38;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&#38;gt;&#60;/p&#62;
&#60;p&#62;&#38;lt;?php $content = $post-&#38;gt;post_content;&#60;br /&#62;
$paragraphs = explode('&#38;lt;p&#38;gt;', $content);&#60;br /&#62;
$i = 0;&#60;br /&#62;
foreach ($paragraphs as $number){&#60;br /&#62;
$i++;&#60;br /&#62;
$q = $i - 1;&#60;br /&#62;
if ($i == 0) {&#60;br /&#62;
echo $q.$number;&#60;br /&#62;
}&#60;br /&#62;
}?&#38;gt;&#60;/p&#62;
&#60;p&#62;&#38;lt;?php endwhile; else: ?&#38;gt;&#60;br /&#62;
&#38;lt;p&#38;gt;&#38;lt;?php _e('Sorry, no posts matched your criteria.'); ?&#38;gt;&#38;lt;/p&#38;gt;&#60;br /&#62;
&#38;lt;?php endif; ?&#38;gt;&#60;br /&#62;
simple enough? btw. this does column splitting by &#38;lt;p&#38;gt; can be any tag though; hope this helps anyone.
&#60;/p&#62;</description>
</item>
<item>
<title>nzahn on "apply_filters content in wordpress 2.8"</title>
<link>http://wordpress.org/support/topic/281512#post-1108326</link>
<pubDate>Thu, 18 Jun 2009 12:04:27 +0000</pubDate>
<dc:creator>nzahn</dc:creator>
<guid isPermaLink="false">1108326@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Well ... I am having a slight problem (of course); I am trying to filter content and explode it - it works great in 2.7 Kubrik and yes it does not work in 2.8 Kubrik; the code in its basic looks like this:&#60;/p&#62;
&#60;p&#62;	`&#38;lt;?php $content = apply_filters('the_content', $post-&#38;gt;post_content );&#60;br /&#62;
			$paragraphs = explode('&#38;lt;p&#38;gt;', $content);&#60;br /&#62;
			$i = 0;&#60;br /&#62;
			foreach ($paragraphs as $number){&#60;br /&#62;
			$i++;&#60;br /&#62;
			$q = $i - 1;&#60;br /&#62;
			if ($i == 0) {&#60;br /&#62;
			echo $q.$number;&#60;br /&#62;
			}&#60;br /&#62;
			}?&#38;gt;`&#60;/p&#62;
&#60;p&#62;the content looks like this:&#60;/p&#62;
&#60;p&#62;&#38;lt;p&#38;gt;First Paragraph&#38;lt;/p&#38;gt;&#38;lt;p&#38;gt;Second Paragraph&#38;lt;/p&#38;gt;&#60;/p&#62;
&#60;p&#62;If you do this it should not display anything - in 2.7 it behaves right; 2.8 shows content from the &#60;code&#62;$post-&#38;gt;post_content&#60;/code&#62; which makes me think that apply_filters does not do its work correctly; I tried looking it up, but nothing found in the documentation of wordpress 2.8; any help would be wonderful. Thanks upfront.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
