Changeset 10200
- Timestamp:
- 10/07/2015 03:08:00 PM (9 years ago)
- Location:
- trunk/src/bp-xprofile
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/bp-xprofile-admin.php
r10179 r10200 180 180 181 181 // Load the field. 182 $field = new BP_XProfile_Field( $field->id );182 $field = xprofile_get_field( $field->id ); 183 183 184 184 $class = ''; … … 330 330 $bp = buddypress(); 331 331 332 $field = new BP_XProfile_Field( $field_id );332 $field = xprofile_get_field( $field_id ); 333 333 $field->group_id = $group_id; 334 334 … … 439 439 // @todo trust this param. 440 440 $field_type = ( 'field' == $field_type ) ? __( 'field', 'buddypress' ) : __( 'option', 'buddypress' ); 441 $field = new BP_XProfile_Field( $field_id );441 $field = xprofile_get_field( $field_id ); 442 442 443 443 if ( !$field->delete( (bool) $delete_data ) ) { -
trunk/src/bp-xprofile/bp-xprofile-filters.php
r10163 r10200 252 252 */ 253 253 function xprofile_filter_format_field_value_by_field_id( $field_value, $field_id ) { 254 $field = new BP_XProfile_Field( $field_id );254 $field = xprofile_get_field( $field_id ); 255 255 return xprofile_filter_format_field_value_by_type( $field_value, $field->type ); 256 256 } -
trunk/src/bp-xprofile/bp-xprofile-functions.php
r10198 r10200 251 251 // Instantiate a new field object. 252 252 if ( ! empty( $r['field_id'] ) ) { 253 $field = new BP_XProfile_Field( $r['field_id'] );253 $field = xprofile_get_field( $r['field_id'] ); 254 254 } else { 255 255 $field = new BP_XProfile_Field; … … 394 394 } 395 395 396 $field = new BP_XProfile_Field( $field_id );396 $field = xprofile_get_field( $field_id ); 397 397 $field_type = BP_XProfile_Field::get_type( $field_id ); 398 398 $field_type_obj = bp_xprofile_create_field_type( $field_type ); … … 505 505 506 506 // 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 ); 508 508 if ( isset( $field->allow_custom_visibility ) && 'disabled' === $field->allow_custom_visibility ) { 509 509 $current_level = $field->default_visibility; -
trunk/src/bp-xprofile/bp-xprofile-template.php
r10179 r10200 811 811 */ 812 812 if ( ! method_exists( $field, 'get_children' ) ) { 813 $field_obj = new BP_XProfile_Field( $field->id );813 $field_obj = xprofile_get_field( $field->id ); 814 814 815 815 foreach ( $field as $field_prop => $field_prop_value ) {
Note: See TracChangeset
for help on using the changeset viewer.