function _birthdays_field_instances in Birthdays 7
Gets all instances of birthday fields that are around.
2 calls to _birthdays_field_instances()
- birthdays_cron in ./
birthdays.module - Implements hook_cron().
- birthdays_trigger_info in ./
birthdays.module - Implements hook_trigger_info().
File
- ./
birthdays.module, line 960 - The Birthdays module allows users to add their birthday to their profile. It lists birthdays on a seperate page and in different blocks. Users can receive an email on their birthday automatically, and the administrator can receive daily reminders of…
Code
function _birthdays_field_instances() {
$result = array();
// Get the instances.
foreach (field_info_fields() as $field) {
if ($field['type'] == 'birthdays_date') {
foreach ($field['bundles'] as $entity_type => $bundles) {
foreach ($bundles as $bundle) {
$result[] = field_info_instance($entity_type, $field['field_name'], $bundle);
}
}
}
}
// Sort them.
usort($result, '_birthdays_field_instances_compare');
return $result;
}