Changeset 1443
- Timestamp:
- 04/29/2009 02:03:35 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile/bp-xprofile-templatetags.php
r1441 r1443 16 16 var $user_id; 17 17 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 ) { 21 21 if ( !$this->groups = wp_cache_get( 'xprofile_groups', 'bp' ) ) { 22 22 $this->groups = BP_XProfile_Group::get_all(true); … … 24 24 } 25 25 } 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' ); 29 29 } 30 30 … … 164 164 $defaults = array( 165 165 'user_id' => $bp->displayed_user->id, 166 ' group_id' => false166 'profile_group_id' => false 167 167 ); 168 168 … … 170 170 extract( $r, EXTR_SKIP ); 171 171 172 $profile_template = new BP_XProfile_Template( $user_id, $ group_id );172 $profile_template = new BP_XProfile_Template( $user_id, $profile_group_id ); 173 173 174 174 return $profile_template->has_groups(); … … 185 185 } 186 186 187 function bp_ group_has_fields() {187 function bp_profile_group_has_fields() { 188 188 global $profile_template; 189 189 return $profile_template->has_fields(); 190 190 } 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 } 191 195 192 196 function bp_field_css_class() {
Note: See TracChangeset
for help on using the changeset viewer.