Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/07/2015 03:08:00 PM (9 years ago)
Author:
boonebgorges
Message:

Use xprofile_get_field() throughout bp-xprofile.

It's properly cached after [10198], so let's use it.

See #6638.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/bp-xprofile-functions.php

    r10198 r10200  
    251251    // Instantiate a new field object.
    252252    if ( ! empty( $r['field_id'] ) ) {
    253         $field = new BP_XProfile_Field( $r['field_id'] );
     253        $field = xprofile_get_field( $r['field_id'] );
    254254    } else {
    255255        $field = new BP_XProfile_Field;
     
    394394    }
    395395
    396     $field          = new BP_XProfile_Field( $field_id );
     396    $field          = xprofile_get_field( $field_id );
    397397    $field_type     = BP_XProfile_Field::get_type( $field_id );
    398398    $field_type_obj = bp_xprofile_create_field_type( $field_type );
     
    505505
    506506    // Use the user's stored level, unless custom visibility is disabled.
    507     $field = new BP_XProfile_Field( $field_id );
     507    $field = xprofile_get_field( $field_id );
    508508    if ( isset( $field->allow_custom_visibility ) && 'disabled' === $field->allow_custom_visibility ) {
    509509        $current_level = $field->default_visibility;
Note: See TracChangeset for help on using the changeset viewer.