You are here

function imagefield_crop_theme in Imagefield Crop 6

Same name and namespace in other branches
  1. 7.3 imagefield_crop.module \imagefield_crop_theme()
  2. 7 imagefield_crop.module \imagefield_crop_theme()
  3. 7.2 imagefield_crop.module \imagefield_crop_theme()

Implementation of hook_theme().

File

./imagefield_crop.module, line 87

Code

function imagefield_crop_theme() {
  $theme = array(
    // imagefield_crop_widget form element type theme function.
    'imagefield_crop_widget' => array(
      'arguments' => array(
        'element' => NULL,
      ),
      'file' => 'imagefield_crop_widget.inc',
    ),
    // display dynamic preview
    'imagefield_crop_dynamic_preview' => array(
      'arguments' => array(
        'file' => NULL,
        'resolution' => 0,
        'preview_width' => 0,
      ),
    ),
    // display admin preview
    'imagefield_crop_widget_preview' => array(
      'arguments' => array(
        'item' => NULL,
      ),
    ),
    // display crop box
    'imagefield_crop_cropbox' => array(
      'arguments' => array(
        'file' => NULL,
        'alt' => '',
        'title' => '',
        'attributes' => NULL,
        'getsize' => TRUE,
        'id' => NULL,
      ),
    ),
    'imagefield_crop_edit_crop_image_row' => array(
      'arguments' => array(
        'element' => NULL,
      ),
    ),
    // ImageField formatter theme functions.
    'imagefield_crop_formatter_image_uncrop_plain' => array(
      'arguments' => array(
        'element' => NULL,
      ),
      'file' => 'imagefield_crop_formatter.inc',
    ),
    'imagefield_crop_formatter_image_uncroplink' => array(
      'arguments' => array(
        'element' => NULL,
      ),
      'file' => 'imagefield_crop_formatter.inc',
    ),
  );
  if (function_exists('imagecache_presets')) {
    foreach (imagecache_presets() as $preset) {
      $theme['imagefield_crop_formatter_' . $preset['presetname'] . '_default_uncropped'] = array(
        'arguments' => array(
          'element' => NULL,
          'function' => 'theme_imagecache_formatter_default',
        ),
        // Passing default value doesn't actually work! d'oh.
        'function' => 'theme_imagefield_crop_formatter_uncropped',
      );
      $theme['imagefield_crop_formatter_' . $preset['presetname'] . '_linked_uncropped'] = array(
        'arguments' => array(
          'element' => NULL,
          'function' => 'theme_imagecache_formatter_linked',
        ),
        'function' => 'theme_imagefield_crop_formatter_uncropped',
      );
      $theme['imagefield_crop_formatter_' . $preset['presetname'] . '_imagelink_uncropped'] = array(
        'arguments' => array(
          'element' => NULL,
          'function' => 'theme_imagecache_formatter_imagelink',
        ),
        'function' => 'theme_imagefield_crop_formatter_uncropped',
      );
      $theme['imagefield_crop_formatter_' . $preset['presetname'] . '_path_uncropped'] = array(
        'arguments' => array(
          'element' => NULL,
          'function' => 'theme_imagecache_formatter_path',
        ),
        'function' => 'theme_imagefield_crop_formatter_uncropped',
      );
      $theme['imagefield_crop_formatter_' . $preset['presetname'] . '_url_uncropped'] = array(
        'arguments' => array(
          'element' => NULL,
          'function' => 'theme_imagecache_formatter_url',
        ),
        'function' => 'theme_imagefield_crop_formatter_uncropped',
      );
    }
  }
  return $theme;
}