blog_id == BP_ROOT_BLOG ) add_action('widgets_init', create_function('', 'return register_widget("BP_Blogs_Recent_Posts_Widget");') ); } add_action( 'bp_register_widgets', 'bp_blogs_register_widgets' ); class BP_Blogs_Recent_Posts_Widget extends WP_Widget { function bp_blogs_recent_posts_widget() { parent::WP_Widget( false, $name = __( 'Recent Site Wide Posts', 'buddypress' ) ); } function widget($args, $instance) { global $bp; extract( $args ); echo $before_widget; echo $before_title . $widget_name . $after_title; if ( empty( $instance['max_posts'] ) || !$instance['max_posts'] ) $instance['max_posts'] = 10; ?>