function flickrfield_theme in Flickr 7
Same name and namespace in other branches
- 6 field/flickrfield.module \flickrfield_theme()
Implements hook_theme(). @todo: the theme definitions for our field-formatters should go in flickrfield_field_formatter_view() @ see https://drupal.org/node/728792 (section "Changed! Hook Formatter")
File
- field/
flickrfield.module, line 249 - Defines a Flickr field type.
Code
function flickrfield_theme() {
$themes = array();
foreach (flickr_photo_sizes() as $size => $info) {
$themes['flickrfield_formatter_' . $size] = array(
'variables' => 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(
'variables' => array(
'element',
),
'function' => 'theme_flickrfield_formatter_photoset_primaryphoto',
);
$themes['flickrfield_formatter_photoset_primaryphoto_size' . $size . '_linknode'] = array(
'variables' => array(
'element',
),
'function' => 'theme_flickrfield_formatter_photoset_primaryphoto',
);
$themes['flickrfield_formatter_photoset_primaryphoto_size' . $size . '_linkflickrcomset'] = array(
'variables' => array(
'element',
),
'function' => 'theme_flickrfield_formatter_photoset_primaryphoto',
);
}
return $themes + array(
'flickrfield_photo' => array(
'variables' => array(
'img',
'photo_url',
'formatter',
'photo_data',
'node',
),
),
'flickrfield_photoset' => array(
'variables' => array(
'img',
'photo_url',
'formatter',
'photo_data',
'node',
),
),
'flickrfield' => array(
'variables' => array(
'element',
),
),
'flickrfield_flickrid' => array(
'variables' => array(
'element',
),
),
'flickrfield_photoset_primaryphoto' => array(
'variables' => array(
'element',
),
),
'flickrfield_formatter_photoset_flickrcomslideshow' => array(
'variables' => array(
'element',
),
),
'flickrfield_formatter_photoset_flickrcomslideshow_simple' => array(
'variables' => array(
'element',
),
),
'flickrfield_formatter_photoset_flickrcomsetlink' => array(
'variables' => array(
'element',
),
),
);
}