Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/14/2009 03:24:05 PM (17 years ago)
Author:
apeatling
Message:

Committing core code support for new default theme.

Removed all deprecated code since it will be released as a separate plugin for backwards compatibility if people need it.

Removed the wire and status updates components since there is no support in the theme for these. If people still want this functionality then I'm sure there is someone in the community that could spend a bit of time and release them as plugins. I'm happy to guide.

Removed a lot of template loop duplication. There are no longer site loops and user loops (e.g. bp_has_site_groups() / bp_has_groups() ). There are now bp_has_members(), bp_has_groups(), bp_has_blogs() and you can pass a "user_id" parameter into these loops to limit results to only that user or users.

Merged activity stream functions. There are no longer functions for bp_activity_get_sitewide() / bp_activity_get_for_user() / bp_activity_get_friends_activity() instead there is simply one function: bp_activity_get() and you can pass in parameters to filter on just friends, for a single user, or anything your heart desires. Actually, filtering is extremely fine grained, so I encourage devs to check out the filter functions.

Lots of other code cleanup.

The new default theme will be committed straight after this. The original default folder will be renamed to bp-classic.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-widgets.php

    r2077 r2168  
    2727           . $after_title; ?>
    2828
    29         <?php if ( bp_has_site_groups( 'type=popular&per_page=' . $instance['max_groups'] . '&max=' . $instance['max_groups'] ) ) : ?>
     29        <?php if ( bp_has_groups( 'type=popular&per_page=' . $instance['max_groups'] . '&max=' . $instance['max_groups'] ) ) : ?>
    3030            <div class="item-options" id="groups-list-options">
    3131                <span class="ajax-loader" id="ajax-loader-groups"></span>
     
    3636
    3737            <ul id="groups-list" class="item-list">
    38                 <?php while ( bp_site_groups() ) : bp_the_site_group(); ?>
     38                <?php while ( bp_groups() ) : bp_the_group(); ?>
    3939                    <li>
    4040                        <div class="item-avatar">
    41                             <a href="<?php bp_the_site_group_link() ?>"><?php bp_the_site_group_avatar_thumb() ?></a>
     41                            <a href="<?php bp_group_permalink() ?>"><?php bp_group_avatar_thumb() ?></a>
    4242                        </div>
    4343
    4444                        <div class="item">
    45                             <div class="item-title"><a href="<?php bp_the_site_group_link() ?>" title="<?php bp_the_site_group_name() ?>"><?php bp_the_site_group_name() ?></a></div>
    46                             <div class="item-meta"><span class="activity"><?php bp_the_site_group_member_count() ?></span></div>
     45                            <div class="item-title"><a href="<?php bp_group_permalink() ?>" title="<?php bp_group_name() ?>"><?php bp_group_name() ?></a></div>
     46                            <div class="item-meta"><span class="activity"><?php bp_group_member_count() ?></span></div>
    4747                        </div>
    4848                    </li>
     
    9999    }
    100100
    101     if ( bp_has_site_groups( 'type=' . $type . '&per_page=' . $_POST['max_groups'] . '&max=' . $_POST['max_groups'] ) ) : ?>
     101    if ( bp_has_groups( 'type=' . $type . '&per_page=' . $_POST['max_groups'] . '&max=' . $_POST['max_groups'] ) ) : ?>
    102102        <?php echo "0[[SPLIT]]"; ?>
    103103
    104104        <ul id="groups-list" class="item-list">
    105             <?php while ( bp_site_groups() ) : bp_the_site_group(); ?>
     105            <?php while ( bp_groups() ) : bp_the_group(); ?>
    106106                <li>
    107107                    <div class="item-avatar">
    108                         <a href="<?php bp_the_site_group_link() ?>"><?php bp_the_site_group_avatar_thumb() ?></a>
     108                        <a href="<?php bp_group_permalink() ?>"><?php bp_group_avatar_thumb() ?></a>
    109109                    </div>
    110110
    111111                    <div class="item">
    112                         <div class="item-title"><a href="<?php bp_the_site_group_link() ?>" title="<?php bp_the_site_group_name() ?>"><?php bp_the_site_group_name() ?></a></div>
     112                        <div class="item-title"><a href="<?php bp_group_permalink() ?>" title="<?php bp_group_name() ?>"><?php bp_group_name() ?></a></div>
    113113                        <div class="item-meta">
    114114                            <span class="activity">
    115115                                <?php
    116116                                if ( 'newest-groups' == $_POST['filter'] ) {
    117                                     bp_the_site_group_date_created();
     117                                    printf( __( 'created %s ago', 'buddypress' ), bp_get_group_date_created() );
    118118                                } else if ( 'recently-active-groups' == $_POST['filter'] ) {
    119                                     bp_the_site_group_last_active();
     119                                    printf( __( 'active %s ago', 'buddypress' ), bp_get_group_last_active() );
    120120                                } else if ( 'popular-groups' == $_POST['filter'] ) {
    121                                     bp_the_site_group_member_count();
     121                                    bp_group_member_count();
    122122                                }
    123123                                ?>
Note: See TracChangeset for help on using the changeset viewer.