[wp-trac] [WordPress Trac] #13169: Return Dynamic Sidebars with get_dynamic_sidebar

WordPress Trac wp-trac at lists.automattic.com
Wed Apr 28 18:15:03 UTC 2010


#13169: Return Dynamic Sidebars with get_dynamic_sidebar
-------------------------+--------------------------------------------------
 Reporter:  w3prodigy    |       Owner:                
     Type:  enhancement  |      Status:  new           
 Priority:  normal       |   Milestone:  Future Release
Component:  General      |     Version:                
 Severity:  normal       |    Keywords:                
-------------------------+--------------------------------------------------

Comment(by w3prodigy):

 Thanks to Filosofo for pointing out that we can use ob_get_clean() instead
 of ob_get_contents() and ob_end_clean(). The use of output buffering is a
 simple solution until further can be developed.

 {{{
 function get_dynamic_sidebar($index = 1)
 {
         $sidebar_contents = "";
         ob_start();
         dynamic_sidebar($index);
         $sidebar_contents = ob_get_clean();
         return $sidebar_contents;
 }
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13169#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list