You are here

function pcp_get_profile_fields in Profile Complete Percent 7

Same name and namespace in other branches
  1. 5 pcp.module \pcp_get_profile_fields()
  2. 6.2 pcp.module \pcp_get_profile_fields()
  3. 6 pcp.module \pcp_get_profile_fields()

Get all the profile fields stored in the system, tagged or not tagged.

1 call to pcp_get_profile_fields()
pcp_admin_settings_form_data in includes/pcp.admin.inc
Function that sets up parameters to be used when the pcp_admin_settings_form() function is executed.

File

./pcp.module, line 278
Allows users with valid permissions to tag profile fields (core fields or Profile2 fields) for a users profile to be considered complete.

Code

function pcp_get_profile_fields($params) {
  $instances = field_read_instances($params);
  $fields = array();
  foreach ($instances as $instance) {
    $fields[$instance['entity_type'] . ':' . $instance['bundle'] . ':' . $instance['field_name']] = $instance['field_name'];
  }
  return $fields;
}