You are here

function lingotek_get_enabled_fields in Lingotek Translation 7.6

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

File

./lingotek.util.inc, line 273
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($bundle);
  }
  return $fields_desired;
}