blogid == bp_get_root_blog_id() ) 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() { $this->__construct(); } function __construct() { parent::__construct( false, $name = __( 'Recent Networkwide 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; ?> 'new_blog_post', 'max' => $instance['max_posts'], 'per_page' => $instance['max_posts'], 'user_id' => 0, 'scope' => false, 'object' => false, 'primary_id' => false ) ) ) : ?>