[buddypress-trac] [BuddyPress] #2616: Add a hook to unregister Sidebars in BP-Default from Child Theme functions.php
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Thu Sep 2 10:46:44 UTC 2010
#2616: Add a hook to unregister Sidebars in BP-Default from Child Theme
functions.php
-------------------------+--------------------------------------------------
Reporter: Bowromir | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 1.3
Component: Core | Keywords: sidebar, register, bp-default, child theme
-------------------------+--------------------------------------------------
I would like to see a hook added to the Parent Theme to allow Child Themes
to deregister the Sidebar. The hook would be as follows:
{{{
/* Register the widget columns */
register_sidebars(
array(
'name' => 'Sidebar',
'before_widget' => '<div id="widgetbox" class="widget
%2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widgettitle">',
'after_title' => '</h3>'
)
add_action( 'widgets_init', 'childtheme_sidebars' );
);
}}}
The sidebars can be added or removed with:
{{{
//functions.php im Child-Theme
function unregister_sidebar() {
unregister_sidebar('Sidebar');
}
add_action( 'childtheme_sidebars', 'unregister_sidebar' )
}}}
This would make it easier to keep the widget area clean for the site
admin.
--
Ticket URL: <https://trac.buddypress.org/ticket/2616>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list