You are here

function imceimage_theme in Imce CCK Image 6

Same name and namespace in other branches
  1. 6.2 imceimage.module \imceimage_theme()

hook_theme - that works together with hook_formatter and hook_elements to provide the default theme and also a theme to display the image as a link.

File

./imceimage.module, line 496

Code

function imceimage_theme() {
  $theme = array(
    'imceimage' => array(
      'arguments' => array(
        'element' => NULL,
      ),
    ),
    'imceimage_formatter_default' => array(
      'arguments' => array(
        'element' => NULL,
      ),
    ),
    'imceimage_formatter_with_caption' => array(
      'arguments' => array(
        'element' => NULL,
      ),
    ),
    'imceimage_formatter_link' => array(
      'arguments' => array(
        'element' => NULL,
      ),
    ),
    'imceimage_formatter_url' => array(
      'arguments' => array(
        'element' => NULL,
      ),
    ),
    'imceimage_formatter_thumb' => array(
      'arguments' => array(
        'element' => NULL,
      ),
    ),
  );
  if (module_exists('imagecache')) {
    foreach (imagecache_presets() as $preset) {
      $theme['imceimage_formatter_' . $preset['presetname'] . '_default'] = array(
        'arguments' => array(
          'element' => NULL,
        ),
        'function' => 'theme_imceimage_formatter',
      );
      $theme['imceimage_formatter_' . $preset['presetname'] . '_linked'] = array(
        'arguments' => array(
          'element' => NULL,
        ),
        'function' => 'theme_imceimage_formatter',
      );
      $theme['imceimage_formatter_' . $preset['presetname'] . '_imagelink'] = array(
        'arguments' => array(
          'element' => NULL,
        ),
        'function' => 'theme_imceimage_formatter',
      );
      $theme['imceimage_formatter_' . $preset['presetname'] . '_path'] = array(
        'arguments' => array(
          'element' => NULL,
        ),
        'function' => 'theme_imceimage_formatter',
      );
      $theme['imceimage_formatter_' . $preset['presetname'] . '_url'] = array(
        'arguments' => array(
          'element' => NULL,
        ),
        'function' => 'theme_imceimage_formatter',
      );
    }
  }
  return $theme;
}