[wp-trac] [WordPress Trac] #13169: Return Dynamic Sidebars with get_dynamic_sidebar
WordPress Trac
wp-trac at lists.automattic.com
Wed Apr 28 18:07:28 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:
-------------------------+--------------------------------------------------
Currently there is no available function to return the contents of a
dynamic sidebar. The following code enables developers to return and
assign the contents of a dynamic sidebar to a variable within their code.
{{{
function get_dynamic_sidebar($index = 1)
{
$sidebar_contents = "";
ob_start();
dynamic_sidebar($index);
$sidebar_contents = ob_get_contents();
ob_end_clean();
return $sidebar_contents;
}
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13169>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list