You are here

function lingotek_get_enabled_fields in Lingotek Translation 7.7

Same name and namespace in other branches
  1. 7.4 lingotek.util.inc \lingotek_get_enabled_fields()
  2. 7.5 lingotek.util.inc \lingotek_get_enabled_fields()
  3. 7.6 lingotek.util.inc \lingotek_get_enabled_fields()

File

./lingotek.util.inc, line 278
Utility functions.

Code

function lingotek_get_enabled_fields($entity_type, $bundle) {
  $translate = variable_get('lingotek_enabled_fields', array());
  $fields_desired = isset($translate[$entity_type][$bundle]) ? $translate[$entity_type][$bundle] : array();
  if (empty($fields_desired)) {

    //this won't work for anything more than nodes yet
    $fields_desired = lingotek_get_translatable_fields_by_content_type($entity_type, $bundle);
  }
  return $fields_desired;
}