__( 'A dynamic list of recently active, popular, and newest groups', 'buddypress' ), 'classname' => 'widget_bp_groups_widget buddypress widget', ); 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', buddypress()->plugin_url . "bp-groups/js/widget-groups{$min}.js", array( 'jquery' ), bp_get_version() ); } } /** * PHP4 constructor * * For backward compatibility only */ function bp_groups_widget() { $this->_construct(); } 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; ?>
0, 'type' => $type, 'per_page' => $per_page, 'max' => $per_page, ); if ( bp_has_groups( $groups_args ) ) : ?>