Skip to:
Content

BuddyPress.org

Ticket #4903: 4903.01.patch

File 4903.01.patch, 2.4 KB (added by DJPaul, 12 years ago)
  • bp-groups/bp-groups-widgets.php

    diff --git a/bp-groups/bp-groups-widgets.php b/bp-groups/bp-groups-widgets.php
    index ef02da5..6b107f6 100644
    a b function groups_ajax_widget_groups_list() { 
    164164
    165165        if ( bp_has_groups( 'type=' . $type . '&per_page=' . $_POST['max_groups'] . '&max=' . $_POST['max_groups'] ) ) : ?>
    166166                <?php echo "0[[SPLIT]]"; ?>
    167 
    168                 <ul id="groups-list" class="item-list">
    169                         <?php while ( bp_groups() ) : bp_the_group(); ?>
    170                                 <li>
    171                                         <div class="item-avatar">
    172                                                 <a href="<?php bp_group_permalink() ?>"><?php bp_group_avatar_thumb() ?></a>
    173                                         </div>
    174 
    175                                         <div class="item">
    176                                                 <div class="item-title"><a href="<?php bp_group_permalink() ?>" title="<?php bp_group_name() ?>"><?php bp_group_name() ?></a></div>
    177                                                 <div class="item-meta">
    178                                                         <span class="activity">
    179                                                                 <?php
    180                                                                 if ( 'newest-groups' == $_POST['filter'] ) {
    181                                                                         printf( __( 'created %s', 'buddypress' ), bp_get_group_date_created() );
    182                                                                 } else if ( 'recently-active-groups' == $_POST['filter'] ) {
    183                                                                         printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() );
    184                                                                 } else if ( 'popular-groups' == $_POST['filter'] ) {
    185                                                                         bp_group_member_count();
    186                                                                 }
    187                                                                 ?>
    188                                                         </span>
    189                                                 </div>
     167                <?php while ( bp_groups() ) : bp_the_group(); ?>
     168                        <li>
     169                                <div class="item-avatar">
     170                                        <a href="<?php bp_group_permalink() ?>"><?php bp_group_avatar_thumb() ?></a>
     171                                </div>
     172
     173                                <div class="item">
     174                                        <div class="item-title"><a href="<?php bp_group_permalink() ?>" title="<?php bp_group_name() ?>"><?php bp_group_name() ?></a></div>
     175                                        <div class="item-meta">
     176                                                <span class="activity">
     177                                                        <?php
     178                                                        if ( 'newest-groups' == $_POST['filter'] ) {
     179                                                                printf( __( 'created %s', 'buddypress' ), bp_get_group_date_created() );
     180                                                        } else if ( 'recently-active-groups' == $_POST['filter'] ) {
     181                                                                printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() );
     182                                                        } else if ( 'popular-groups' == $_POST['filter'] ) {
     183                                                                bp_group_member_count();
     184                                                        }
     185                                                        ?>
     186                                                </span>
    190187                                        </div>
    191                                 </li>
     188                                </div>
     189                        </li>
     190                <?php endwhile; ?>
    192191
    193                         <?php endwhile; ?>
    194                 </ul>
    195192                <?php wp_nonce_field( 'groups_widget_groups_list', '_wpnonce-groups' ); ?>
    196193                <input type="hidden" name="groups_widget_max" id="groups_widget_max" value="<?php echo esc_attr( $_POST['max_groups'] ); ?>" />
    197194