Changeset 7915 for trunk/bp-xprofile/bp-xprofile-classes.php
- Timestamp:
- 02/17/2014 07:54:32 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile/bp-xprofile-classes.php
r7914 r7915 266 266 } 267 267 268 // Prime the meta cache, if necessary 269 if ( $update_meta_cache ) { 270 bp_xprofile_update_meta_cache( $object_ids ); 271 } 272 268 273 // Maybe fetch visibility levels 269 274 if ( !empty( $fetch_visibility_level ) ) { … … 292 297 // Reset indexes 293 298 $groups = array_values( $groups ); 294 }295 296 // Prime the meta cache, if necessary297 if ( $update_meta_cache ) {298 bp_xprofile_update_meta_cache( $object_ids );299 299 } 300 300 … … 394 394 $visibility_levels = bp_get_user_meta( $user_id, 'bp_xprofile_visibility_levels', true ); 395 395 396 // Get the admin-set preferences397 $admin_set_levels = self::fetch_default_visibility_levels();398 399 396 foreach( (array) $fields as $key => $field ) { 400 397 401 398 // Does the admin allow this field to be customized? 402 $allow_custom = empty( $admin_set_levels[$field->id]['allow_custom'] ) || 'allowed' == $admin_set_levels[$field->id]['allow_custom'];399 $allow_custom = 'disabled' !== bp_xprofile_get_meta( $field->id, 'field', 'allow_custom_visibility' ); 403 400 404 401 // Look to see if the user has set the visibility for this field … … 408 405 // If no admin-set default is saved, fall back on a global default 409 406 } else { 410 $field_visibility = !empty( $admin_set_levels[$field->id]['default'] ) ? $admin_set_levels[$field->id]['default'] : apply_filters( 'bp_xprofile_default_visibility_level', 'public' ); 407 $fallback_visibility = bp_xprofile_get_meta( $field->id, 'field', 'default_visibility' ); 408 $field_visibility = ! empty( $fallback_visibility ) ? $fallback_visibility : apply_filters( 'bp_xprofile_default_visibility_level', 'public' ); 411 409 } 412 410
Note: See TracChangeset
for help on using the changeset viewer.