Changeset 4869 for trunk/bp-xprofile/bp-xprofile-template.php
- Timestamp:
- 07/26/2011 05:26:30 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile/bp-xprofile-template.php
r4840 r4869 21 21 var $user_id; 22 22 23 function bp_xprofile_data_template( $user_id, $profile_group_id, $hide_empty_groups = false, $fetch_fields = false, $fetch_field_data = false, $exclude_groups = false, $exclude_fields = false ) {24 $this->__construct( $user_id, $profile_group_id, $hide_empty_groups, $fetch_fields, $fetch_field_data, $exclude_groups, $exclude_fields );25 } 26 27 function __construct( $user_id, $profile_group_id, $hide_empty_groups = false, $fetch_fields = false, $fetch_field_data = false, $exclude_groups = false, $exclude_fields = false ) {23 function bp_xprofile_data_template( $user_id, $profile_group_id, $hide_empty_groups = false, $fetch_fields = false, $fetch_field_data = false, $exclude_groups = false, $exclude_fields = false, $hide_empty_fields = false ) { 24 $this->__construct( $user_id, $profile_group_id, $hide_empty_groups, $fetch_fields, $fetch_field_data, $exclude_groups, $exclude_fields, $hide_empty_fields ); 25 } 26 27 function __construct( $user_id, $profile_group_id, $hide_empty_groups = false, $fetch_fields = false, $fetch_field_data = false, $exclude_groups = false, $exclude_fields = false, $hide_empty_fields = false ) { 28 28 $this->groups = BP_XProfile_Group::get( array( 29 29 'profile_group_id' => $profile_group_id, 30 30 'user_id' => $user_id, 31 31 'hide_empty_groups' => $hide_empty_groups, 32 'hide_empty_fields' => $hide_empty_fields, 32 33 'fetch_fields' => $fetch_fields, 33 34 'fetch_field_data' => $fetch_field_data, … … 153 154 global $bp, $profile_template; 154 155 156 // Only show empty fields if we're on the Dashboard, or on a user's profile edit page 157 $hide_empty_fields = ( !is_network_admin() && !is_admin() && !bp_is_user_profile_edit() ); 158 155 159 $defaults = array( 156 160 'user_id' => $bp->displayed_user->id, 157 161 'profile_group_id' => false, 158 162 'hide_empty_groups' => true, 163 'hide_empty_fields' => $hide_empty_fields, 159 164 'fetch_fields' => true, 160 165 'fetch_field_data' => true, … … 166 171 extract( $r, EXTR_SKIP ); 167 172 168 $profile_template = new BP_XProfile_Data_Template( $user_id, $profile_group_id, $hide_empty_groups, $fetch_fields, $fetch_field_data, $exclude_groups, $exclude_fields );173 $profile_template = new BP_XProfile_Data_Template( $user_id, $profile_group_id, $hide_empty_groups, $fetch_fields, $fetch_field_data, $exclude_groups, $exclude_fields, $hide_empty_fields ); 169 174 return apply_filters( 'bp_has_profile', $profile_template->has_groups(), $profile_template ); 170 175 } … … 190 195 function bp_get_field_css_class( $class = false ) { 191 196 global $profile_template; 192 197 193 198 $css_classes = array(); 194 199
Note: See TracChangeset
for help on using the changeset viewer.