You are here

function flickrfield_theme in Flickr 6

Same name and namespace in other branches
  1. 7 field/flickrfield.module \flickrfield_theme()

Implements hook_theme().

File

field/flickrfield.module, line 273
Defines a Flickr field type.

Code

function flickrfield_theme() {
  require_once drupal_get_path('module', 'flickr') . '/flickr.inc';
  $themes = array();
  foreach (flickr_photo_sizes() as $size => $info) {
    $themes['flickrfield_formatter_' . $size] = array(
      'arguments' => array(
        'element',
      ),
      'function' => 'theme_flickrfield_field_formatter',
    );

    // Theme function for the primary photo formatters of a Flickr photo set.
    $themes['flickrfield_formatter_photoset_primaryphoto_size' . $size . '_nolink'] = array(
      'arguments' => array(
        'element',
      ),
      'function' => 'theme_flickrfield_formatter_photoset_primaryphoto',
    );
    $themes['flickrfield_formatter_photoset_primaryphoto_size' . $size . '_linknode'] = array(
      'arguments' => array(
        'element',
      ),
      'function' => 'theme_flickrfield_formatter_photoset_primaryphoto',
    );
    $themes['flickrfield_formatter_photoset_primaryphoto_size' . $size . '_linkflickrcomset'] = array(
      'arguments' => array(
        'element',
      ),
      'function' => 'theme_flickrfield_formatter_photoset_primaryphoto',
    );
  }
  return $themes + array(
    'flickrfield_photo' => array(
      'arguments' => array(
        'img',
        'photo_url',
        'formatter',
        'photo_data',
        'node',
      ),
    ),
    'flickrfield_photoset' => array(
      'arguments' => array(
        'img',
        'photo_url',
        'formatter',
        'photo_data',
        'node',
      ),
    ),
    'flickrfield' => array(
      'arguments' => array(
        'element',
      ),
    ),
    'flickrfield_flickrid' => array(
      'arguments' => array(
        'element',
      ),
    ),
    'flickrfield_photoset_primaryphoto' => array(
      'arguments' => array(
        'element',
      ),
    ),
    'flickrfield_formatter_photoset_flickrcomslideshow' => array(
      'arguments' => array(
        'element',
      ),
    ),
    'flickrfield_formatter_photoset_flickrcomslideshow_simple' => array(
      'arguments' => array(
        'element',
      ),
    ),
    'flickrfield_formatter_photoset_flickrcomsetlink' => array(
      'arguments' => array(
        'element',
      ),
    ),
  );
}