__( 'Primary Navigation', 'buddypress' ),
) );
/* Sidebars */
register_sidebars( 1,
array(
'name' => 'static sidebar',
'before_widget' => '
',
'after_widget' => '
',
'before_title' => ''
)
);
/* index sidebar
used on the home page */
register_sidebars( 1,
array(
'name' => 'index sidebar',
'before_widget' => '',
'after_widget' => '
',
'before_title' => ''
)
);
/* activity sidebar
used on the activity page */
register_sidebars( 1,
array(
'name' => 'activity sidebar',
'before_widget' => '',
'after_widget' => '
',
'before_title' => ''
)
);
/* index sidebar
used on the members page */
register_sidebars( 1,
array(
'name' => 'members sidebar',
'before_widget' => '',
'after_widget' => '
',
'before_title' => ''
)
);
/* index sidebar
used on the groups page */
register_sidebars( 1,
array(
'name' => 'groups sidebar',
'before_widget' => '',
'after_widget' => '
',
'before_title' => ''
)
);
/* index sidebar
used on the blogs page */
register_sidebars( 1,
array(
'name' => 'blogs sidebar',
'before_widget' => '',
'after_widget' => '
',
'before_title' => ''
)
);
/* index sidebar
used on the forums page
note that this sidebar contains the Forum Topic Tags used in the default Buddypress sidebar */
register_sidebars( 1,
array(
'name' => 'forums sidebar',
'before_widget' => '',
'after_widget' => '
',
'before_title' => ''
)
);
/* Function to remove the Buddypress default sidebar
note for exery side bar added or removed the 'sidebar count' will have to be adjusted
eg: removine the blogs sidebar will result in 'sidebar-7' in the below function */
function remove_sidebar() {
unregister_sidebar('sidebar-8');
}
add_action( 'admin_init', 'remove_sidebar');
/*remove buddypress admin bar */
function ux_remove_buddypress_admin_bar_install() { /* @todo: check if WPMU + BudyPress is installed */ }
function ux_remove_buddypress_admin_bar_init() {
/* @todo: check if WPMU + BudyPress is installed */
if ( function_exists('bp_core_admin_bar') ) remove_action( 'wp_footer', 'bp_core_admin_bar', 8 );
if ( function_exists('bp_core_admin_bar') ) remove_action( 'admin_footer', 'bp_core_admin_bar' );
if ( function_exists('bp_core_admin_bar_css') ) {
remove_action( 'wp_head', 'bp_core_admin_bar_css', 1 ); // priority 1 for RC2 BuddyPress release
}
if ( function_exists('bp_core_add_admin_css') ) remove_action( 'admin_menu', 'bp_core_add_admin_css' );
}
function ux_remove_buddypress_admin_bar_uninstall() { }
/* Change the number of activity items to show per page */
function my_custom_query_filter( $query_string ) {
$query_string .= '&per_page=10';
return $query_string;
}
add_filter( 'bp_dtheme_ajax_querystring', 'my_custom_query_filter' );
/** Hooks */
register_activation_hook( __FILE__, 'ux_remove_buddypress_admin_bar_install' );
add_action( 'init', 'ux_remove_buddypress_admin_bar_init' );
register_deactivation_hook( __FILE__, 'ux_remove_buddypress_admin_bar_uninstall' );
?>