function pcp_get_bundles in Profile Complete Percent 7
Get array of available pcp bundles.
File
- ./
pcp.module, line 599 - 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_bundles($filter = 'all') {
static $bundles = array();
if (empty($bundles)) {
// Add core user profile.
if ($filter != 'profile2') {
$bundles['user'] = 'user';
}
// Add profile2 types.
if ($profile2_entity = entity_get_info('profile2')) {
foreach ($profile2_entity['bundles'] as $bundle => $values) {
$bundles['profile2'] = $bundle;
}
}
}
return $bundles;
}