_construct(); } function __construct() { $widget_ops = array( 'description' => __( 'A dynamic list of recently active, popular, and newest groups', 'buddypress' ), 'classname' => 'widget_bp_groups_widget buddypress', ); parent::__construct( false, _x( '(BuddyPress) Groups', 'widget name', 'buddypress' ), $widget_ops ); if ( is_active_widget( false, false, $this->id_base ) && !is_admin() && !is_network_admin() ) { $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; wp_enqueue_script( 'groups_widget_groups_list-js', BP_PLUGIN_URL . "bp-groups/js/widget-groups{$min}.js", array( 'jquery' ), bp_get_version() ); } } function widget( $args, $instance ) { $user_id = apply_filters( 'bp_group_widget_user_id', '0' ); extract( $args ); if ( empty( $instance['group_default'] ) ) $instance['group_default'] = 'popular'; if ( empty( $instance['title'] ) ) $instance['title'] = __( 'Groups', 'buddypress' ); $title = apply_filters( 'widget_title', $instance['title'] ); echo $before_widget; $title = !empty( $instance['link_title'] ) ? '' . $title . '' : $title; echo $before_title . $title . $after_title; ?>
class="selected"> | class="selected"> | class="selected">
__( 'Groups', 'buddypress' ), 'max_groups' => 5, 'group_default' => 'active', 'link_title' => false ); $instance = wp_parse_args( (array) $instance, $defaults ); $title = strip_tags( $instance['title'] ); $max_groups = strip_tags( $instance['max_groups'] ); $group_default = strip_tags( $instance['group_default'] ); $link_title = (bool)$instance['link_title']; ?>

  • " . __("No groups matched the current filter.", 'buddypress'); ?>