Revision 6e3ce7c2
Added by Assos Assos over 3 years ago
drupal7/sites/all/modules/ctools/includes/fields.inc | ||
---|---|---|
238 | 238 |
function ctools_field_invoke_field($field_name, $op, $entity_type, $entity, &$a = NULL, &$b = NULL, $options = array()) { |
239 | 239 |
if (is_array($field_name)) { |
240 | 240 |
$instance = $field_name; |
241 |
$field = empty($field_name['field']) ? field_info_field($instance['field_name']) : $field_name['field']; |
|
242 |
$field_name = $instance['field_name']; |
|
243 | 241 |
} |
244 | 242 |
else { |
245 | 243 |
list(, , $bundle) = entity_extract_ids($entity_type, $entity); |
... | ... | |
250 | 248 |
return; |
251 | 249 |
} |
252 | 250 |
|
251 |
// Keep the variables consistent regardless if we retrieve the field instance |
|
252 |
// ourself, or if one is provided to us via the $field_name variable. |
|
253 |
$field = field_info_field($instance['field_name']); |
|
254 |
$field_name = $instance['field_name']; |
|
255 |
|
|
253 | 256 |
// Merge default options. |
254 | 257 |
$default_options = array( |
255 | 258 |
'default' => FALSE, |
Also available in: Unified diff
Weekly update of contrib modules