Skip to:
Content

BuddyPress.org

Changeset 1443


Ignore:
Timestamp:
04/29/2009 02:03:35 PM (16 years ago)
Author:
apeatling
Message:

Changing $group_id to $profile_group_id to reduce confusion.

File:
1 edited

Legend:

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

    r1441 r1443  
    1616    var $user_id;
    1717
    18     function bp_xprofile_template( $user_id, $group_id ) {
    19        
    20         if ( !$group_id ) {
     18    function bp_xprofile_template( $user_id, $profile_group_id ) {
     19       
     20        if ( !$profile_group_id ) {
    2121            if ( !$this->groups = wp_cache_get( 'xprofile_groups', 'bp' ) ) {
    2222                $this->groups = BP_XProfile_Group::get_all(true);
     
    2424            }
    2525        } else {
    26             if ( !$this->groups = wp_cache_get( 'xprofile_group_' . $group_id, 'bp' ) ) {
    27                 $this->groups = new BP_XProfile_Group( $group_id );
    28                 wp_cache_set( 'xprofile_group_' . $group_id, 'bp' );
     26            if ( !$this->groups = wp_cache_get( 'xprofile_group_' . $profile_group_id, 'bp' ) ) {
     27                $this->groups = new BP_XProfile_Group( $profile_group_id );
     28                wp_cache_set( 'xprofile_group_' . $profile_group_id, 'bp' );
    2929            }
    3030           
     
    164164    $defaults = array(
    165165        'user_id' => $bp->displayed_user->id,
    166         'group_id' => false
     166        'profile_group_id' => false
    167167    );
    168168
     
    170170    extract( $r, EXTR_SKIP );
    171171   
    172     $profile_template = new BP_XProfile_Template( $user_id, $group_id );
     172    $profile_template = new BP_XProfile_Template( $user_id, $profile_group_id );
    173173   
    174174    return $profile_template->has_groups();
     
    185185}
    186186
    187 function bp_group_has_fields() {
     187function bp_profile_group_has_fields() {
    188188    global $profile_template;
    189189    return $profile_template->has_fields();
    190190}
     191    /* Deprecated: Don't use this as it it too easily confused with site groups */
     192    function bp_group_has_fields() {
     193        return bp_profile_group_has_fields();
     194    }
    191195
    192196function bp_field_css_class() {
Note: See TracChangeset for help on using the changeset viewer.