BP_XProfile_Field_Type_Telephone::get_field_settings( BP_XProfile_Field $field )
Get all settings for field.
Description
Parameters
- $field
-
(Required)
Return
(array)
Source
File: bp-xprofile/classes/class-bp-xprofile-field-type-telephone.php
public function get_field_settings ( BP_XProfile_Field $field ) {
$defaults = array(
'phone_format' => 'international',
);
$settings = array();
foreach ( $defaults as $key => $value ) {
$saved = bp_xprofile_get_meta( $field->id, 'field', $key, true );
if ( $saved ) {
$settings[ $key ] = $saved;
} else {
$settings[ $key ] = $value;
}
}
return $settings;
}
Changelog
| Version | Description |
|---|---|
| BuddyBoss 1.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.