Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/06/2010 04:24:57 PM (14 years ago)
Author:
apeatling
Message:

Merging 1.2 branch with trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-templatetags.php

    r2950 r3232  
    2727        if ( isset( $_REQUEST['letter'] ) && '' != $_REQUEST['letter'] ) {
    2828            $this->members = BP_Core_User::get_users_by_letter( $_REQUEST['letter'], $this->pag_num, $this->pag_page, $populate_extras );
    29         } else {
    30             $this->members = bp_core_get_users( array( 'type' => $this->type, 'per_page' => $this->pag_num, 'page' => $this->pag_page, 'user_id' => $user_id, 'include' => $include, 'search_terms' => $search_terms, 'populate_extras' => $populate_extras ) );
     29        }
     30        else if ( false !== $include ) {
     31            $this->members = BP_Core_User::get_specific_users( $include, $this->pag_num, $this->pag_page, $populate_extras );
     32        }
     33        else {
     34            $this->members = bp_core_get_users( array( 'type' => $this->type, 'per_page' => $this->pag_num, 'page' => $this->pag_page, 'user_id' => $user_id, 'search_terms' => $search_terms, 'populate_extras' => $populate_extras ) );
    3135        }
    3236
     
    160164
    161165    $members_template = new BP_Core_Members_Template( $type, $page, $per_page, $max, $user_id, $search_terms, $include, (bool)$populate_extras );
    162     return apply_filters( 'bp_has_members', $members_template->has_members(), &$members_template );
     166
     167    return $members_template->has_members();
    163168}
    164169
     
    312317
    313318        // Populate the user if it hasn't been already.
    314         if ( empty( $members_template->member->profile_data ) && method_exists( 'BP_XProfile_ProfileData', 'get_all_for_user' ) )
    315             $members_template->member->profile_data = BP_XProfile_ProfileData::get_all_for_user( $members_template->member->id );
     319        if ( empty( $members_template->member->profile_data ) )
     320            $members_template->member = new BP_Core_User( $members_template->member->id );
    316321
    317322        $data = xprofile_format_profile_field( $members_template->member->profile_data[$field]['field_type'], $members_template->member->profile_data[$field]['field_data'] );
     
    676681function bp_is_home() { return bp_is_my_profile(); }
    677682
     683function bp_get_loggedin_user_link() {
     684    global $bp;
     685
     686    return $bp->loggedin_user->domain;
     687}
     688
     689function bp_get_displayed_user_link() {
     690    global $bp;
     691
     692    return $bp->displayed_user->domain;
     693}
     694
    678695function bp_last_activity( $user_id = false, $echo = true ) {
    679696    global $bp;
     
    690707}
    691708
    692 function bp_user_firstname( $name = false ) {
    693     echo bp_get_user_firstname( $name );
     709function bp_user_firstname() {
     710    echo bp_get_user_firstname();
    694711}
    695712    function bp_get_user_firstname( $name = false ) {
     
    708725
    709726    echo apply_filters( 'bp_the_avatar_thumbnail', $bp->displayed_user->domain );
    710 }
    711 
    712 function bp_get_loggedin_user_link() {
    713     global $bp;
    714 
    715     return $bp->loggedin_user->domain;
    716 }
    717 
    718 function bp_get_displayed_user_link() {
    719     global $bp;
    720 
    721     return $bp->displayed_user->domain;
    722727}
    723728
     
    919924    } else if ( bp_is_activation_page() ) {
    920925        $title = __( 'Activate your Account', 'buddypress' );
    921 
    922     } else if ( bp_is_group_create() ) {
    923         $title = __( 'Create a Group', 'buddypress' );
    924 
    925     } else if ( bp_is_create_blog() ) {
    926         $title = __( 'Create a Blog', 'buddypress' );
    927926    }
    928927
     
    990989
    991990function bp_search_form_type_select() {
    992     global $bp;
    993 
    994991    // Eventually this won't be needed and a page will be built to integrate all search results.
    995992    $selection_box = '<select name="search-which" id="search-which" style="width: auto">';
     
    11801177
    11811178function bp_signup_avatar( $args = '' ) {
    1182     echo bp_get_signup_avatar( $args = '' );
     1179    echo bp_get_signup_avatar( $args );
    11831180}
    11841181    function bp_get_signup_avatar( $args = '' ) {
     
    12061203
    12071204            $gravatar_url = apply_filters( 'bp_gravatar_url', 'http://www.gravatar.com/avatar/' );
    1208             return apply_filters( 'bp_get_signup_avatar', '<img src="' . $gravatar_url . md5( $_POST['signup_email'] ) . '?d=' . $default_grav . '&amp;s=' . $size ) . '" width="' . $size . '" height="' . $size . '" alt="' . $alt . '" class="' . $class . '" />';
     1205            $gravatar_img = '<img src="' . $gravatar_url . md5( strtolower( $_POST['signup_email'] ) ) . '?d=' . $default_grav . '&amp;s=' . $size . '" width="' . $size . '" height="' . $size . '" alt="' . $alt . '" class="' . $class . '" />';
    12091206        } else {
    1210             return apply_filters( 'bp_get_signup_avatar', bp_core_fetch_avatar( array( 'item_id' => $signup_avatar_dir, 'object' => 'signup', 'avatar_dir' => 'avatars/signups', 'type' => 'full', 'width' => $size, 'height' => $size, 'alt' => $alt, 'class' => $class ) ) );
     1207            $gravatar_img = bp_core_fetch_avatar( array( 'item_id' => $signup_avatar_dir, 'object' => 'signup', 'avatar_dir' => 'avatars/signups', 'type' => 'full', 'width' => $size, 'height' => $size, 'alt' => $alt, 'class' => $class ) );
    12111208        }
     1209
     1210        return apply_filters( 'bp_get_signup_avatar', $gravatar_img );
    12121211    }
    12131212
     
    12511250
    12521251function bp_registration_needs_activation() {
    1253     return apply_filters( 'bp_registration_needs_activation', true );
     1252    return apply_filters( 'bp_registration_needs_activation', bp_core_is_multisite() );
    12541253}
    12551254
Note: See TracChangeset for help on using the changeset viewer.