function photos_theme_photos_block in Album Photos 7.3
Same name and namespace in other branches
- 8.4 photos.module \photos_theme_photos_block()
Theme photos block.
1 string reference to 'photos_theme_photos_block'
- photos_theme in ./
photos.module - Implememtns hook_theme().
File
- ./
photos.module, line 1473 - Implementation of photos.module.
Code
function photos_theme_photos_block($variables) {
$type = $variables['type'];
$images = $variables['images'];
$items = array();
$style_name = variable_get('photos_thumb_imagesize', 'thumbnail');
switch ($type) {
case 'image':
foreach ($images as $image) {
$items[] = theme('photos_imagehtml', array(
'image' => $image,
'style_name' => $style_name,
));
}
break;
case 'album':
foreach ($images as $album) {
$op['attributes']['title'] = $album['node']->count ? t('A total of @title images', array(
'@title' => $album['node']->count,
)) : t('Album is empty');
$items[] = $album['view'] . '<div class="photos_block_album_title">' . l($album['node']->title, 'node/' . $album['node']->nid, $op) . '</div>';
}
}
return theme('item_list', array(
'items' => $items,
));
}