function bricks_field_widget_info_alter in Bricks 2.x
Same name and namespace in other branches
- 8 bricks.module \bricks_field_widget_info_alter()
Implements hook_field_widget_info_alter().
File
- ./
bricks.module, line 213
Code
function bricks_field_widget_info_alter(array &$info) {
// Let Bricks to re-use ANY Entity Reference -compatible widgets:
foreach ($info as $widget_id => &$widget_info) {
if (in_array('entity_reference', $widget_info['field_types'])) {
$widget_info['field_types'][] = 'bricks';
}
if (in_array('entity_reference_revisions', $widget_info['field_types'])) {
$widget_info['field_types'][] = 'bricks_revisioned';
}
}
}