There are some specific uses I can think of:<br><ol><li>Some functions have no "echo" parameter and always print the output. If you wanted to run a filter over the output of such a function, this seems like an easy way to do so.</li>
<li>Ad hoc insertions of widgets/widget areas. Let's say you have defined a sidebar that you want to be able to insert within your posts. You could do this by defining a shortcode, which prints out dynamic_sidebar in an output buffer.<br>
</li></ol><br><div class="gmail_quote">On Wed, Jun 29, 2011 at 5:18 AM, Ryan Hellyer <span dir="ltr"><<a href="mailto:ryan@pixopoint.com">ryan@pixopoint.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
There are many reasons to use output buffering (ob_start etc), but<br>
they would rarely be used within a theme. I've seen themes which use<br>
buffering as a way to dynamically minify the markup, but that's a<br>
horrid way to do it - much better incorporated within a caching plugin<br>
IMO.<br>
<br>
There may be a practical use for output buffer in a theme, but I'm<br>
darned if I can think of a good example. I wouldn't want to see it<br>
banned outright, as someone may come up with a cunning use for it that<br>
none of us have thought of.<br>
<br>
Perhaps the theme check plugin could check for output buffering<br>
functions and leave a request for the theme developer to provide a<br>
reason for using it? That way they'll know it's non-standard and<br>
provide a reason (good or bad) for the theme reviewers to read. Could<br>
potentially save a little to and fro'ing in the future. Just an idea.<br>
_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Sayontan Sinha<br><a href="http://mynethome.net" target="_blank">http://mynethome.net</a> | <a href="http://mynethome.net/blog" target="_blank">http://mynethome.net/blog</a><br>
--<br>Beating Australia in Cricket is like killing a celebrity. The death gets more coverage than the crime.<br><br>