function theme_itweak_upload_thumbnail in iTweak Upload 6.2
Same name and namespace in other branches
- 7.3 itweak_upload.module \theme_itweak_upload_thumbnail()
Theme function to show image attachment thumbnail
Parameters
$thumbnail: Link to thumbnail.
$href: URL to link thumbnail to.
$title_text: Optional. Text for thumbnail open link title.
$caption_text: Optional. Text for thumbnail caption.
$options: Optional. Array of options for the thumbnail link. Can add special handler.
Return value
The themed thumbnail
1 theme call to theme_itweak_upload_thumbnail()
- itweak_upload_itweak_upload_preview in ./
itweak_upload.module - Implementation of hook_itweak_upload_preview().
File
- ./
itweak_upload.module, line 1183 - iTweakUpload - Tweak attachments display and file upload forms.
Code
function theme_itweak_upload_thumbnail($thumbnail, $href, $title_text = NULL, $caption_text = NULL, $options = NULL) {
// $inner = '<div class="itu-attachment-thumb-wrap">' . $thumbnail . '</div>';
// if ($caption_text) {
// $inner = '<div class="itu-attachment-thumb-caption">' . $caption_text . '</div>'
// . $inner;
// }
// $inner = '<div class="itu-attachment-thumb">' . $inner . '</div>';
// return l($inner, $href, array('html' => TRUE));
if (!$options) {
$options = array();
}
$options += array(
'html' => TRUE,
);
if ($title_text) {
$options['attributes']['title'] = $title_text;
}
$html = l($thumbnail, $href, $options);
// FIXME: Due to CSS2/cross-browser capability to make shrink-wrap div, the below part does not work.
// Any CSS guru can solve that? BTW, tooltips are shown by title in img.
// if ($caption_text) {
// $html = '<div class="itu-attachment-thumb-caption">' . $caption_text . '</div>' . $html;
// // FIXME: can use caption ABOVE vs. BELOW setting
// }
$html = '<div class="itu-attachment-thumb">' . $html . '</div>';
return $html;
}