You are here

function _imagefield_extended_fields in ImageField Extended 6.4

Same name and namespace in other branches
  1. 6.3 imagefield_extended.module \_imagefield_extended_fields()

A private helper function to cache / normalise the custom field titles.

6 calls to _imagefield_extended_fields()
imagefield_extended_filefield_data_info in ./imagefield_extended.module
Implementation of hook_filefield_data_info().
imagefield_extended_token_list in ./imagefield_extended.module
Implements hook_token_list().
imagefield_extended_token_values in ./imagefield_extended.module
Implements hook_token_values().
imagefield_extended_widget_process in ./imagefield_extended.module
Element #process callback function.
imagefield_extended_widget_settings_alter in ./imagefield_extended.module
Implementation of hook_widget_settings_alter().

... See full list

File

./imagefield_extended.module, line 289
Insert additional fields into a FileField / ImageField data array.

Code

function _imagefield_extended_fields() {
  static $fields;
  if (!isset($fields)) {
    $fields = array(
      'textfields' => imagefield_extended_keyed_values(variable_get('imagefield_extended_textfields', '')),
      'textfield options' => array(
        'textfield' => t('Single line text'),
        'textarea' => t('Multi-line text'),
        'formatted' => t('Formatted multi-line text'),
      ),
      'checkboxes' => imagefield_extended_keyed_values(variable_get('imagefield_extended_checkboxes', '')),
    );
    if (module_exists('wysiwyg')) {
      $fields['textfield formats']['formatted'] = t('WYSIWYG support');
    }
  }
  return $fields;
}