Updating some function filters in Omeka/ExhibitBuilder 2.0. The following seems to work except for the fact the the exhibit pages now always return a thumbnail image instead of letting the page template decide between thumbnails and fullsize. Why?
add_filter('exhibit_builder_attachment_markup','my_exhibit_builder_attachment_markup');
function my_exhibit_builder_attachment_markup($attachment, $fileOptions=array(), $linkProperties=array()){
$attachment=exhibit_builder_page_attachment();
if (!$attachment) {
return '';
}
$item = $attachment['item'];
$file = $attachment['file'];
if (!isset($fileOptions['linkAttributes']['href'])) {
$fileOptions['linkAttributes']['href'] = exhibit_builder_exhibit_item_uri($item);
}
if (!isset($fileOptions['imgAttributes']['alt'])) {
$fileOptions['imgAttributes']['alt'] = metadata($item, array('Dublin Core', 'Title'));
}
if (!isset($fileOptions['imgAttributes']['rel'])) {
$fileOptions['imgAttributes']['rel'] = 'tooltip';
}
if ($file) {
$html = file_markup($file, $fileOptions, null);
} else if($item) {
$html = exhibit_builder_link_to_exhibit_item(null, $linkProperties, $item);
}
$html .= exhibit_builder_attachment_caption($attachment);
return $html;
}
What am I missing this time?
Thanks -- E