<div class="cbox"> <?php $fetch_group_mode = get_option('tn_blogsmu_home_feat_group_id'); $fetch_group_mode_header = get_option('tn_blogsmu_home_feat_group_header'); if ($fetch_group_mode_header == '') { ?> <h3><?php _e("Checkout our growing community network, why not join one of them?", TEMPLATE_DOMAIN); ?> </h3> <?php } else { ?> <h3><?php echo stripcslashes($fetch_group_mode_header); ?> </h3> <?php } ?> <?php if ($fetch_group_mode == '') { fetch_random_groups($limit = '6', $size = '138', $type = 'full', $block_id = 'random-groups'); } else { fetch_specific_groups($limit = '6', $size = '138', $type = 'full', $block_id = 'random-groups'); } ?> </div>
function widget($args, $instance) { // outputs the content of the widget extract($args); // Make before_widget, etc available. $rg_name = empty($instance['title']) ? __('BuddyPress Random Groups', TEMPLATE_DOMAIN) : apply_filters('widget_title', $instance['title']); $unique_id = $args['widget_id']; echo $before_widget; echo $before_title . $rg_name . $after_title; echo fetch_random_groups($limit = 12, $size = 50, $type = 'thumb'); echo $after_widget; }