You are here

function imageinfo_cache_form_alter in Imageinfo Cache 6.2

Same name and namespace in other branches
  1. 6 imageinfo_cache.module \imageinfo_cache_form_alter()

Implements hook_form_alter().

File

./imageinfo_cache.module, line 56
Cache image info for theme_imagecache & theme_imagefield_image.

Code

function imageinfo_cache_form_alter(&$form, $form_state, $form_id) {

  // Make sure form is a filefiled using the imagefield widget
  if (empty($form['basic']['type']['#value']) || $form['basic']['type']['#value'] != 'filefield' || empty($form['widget_module']['#value']) || $form['widget_module']['#value'] != 'imagefield') {
    return;
  }

  // Call function in imageinfo_cache.admin.inc
  module_load_include('inc', 'imageinfo_cache', 'imageinfo_cache.admin');
  return imageinfo_cache_cck_widget_form($form, $form_state, $form_id);
}