function theme_simplelogin_imageupload in SimpleLogin 7
Implements theme_sl_imageupload theme callback.
1 theme call to theme_simplelogin_imageupload()
- simplelogin_background_form in inc/
simplelogin.inc - Implements of background image form.
File
- ./
simplelogin.module, line 143 - The Login screens, which controls the customized background image.
Code
function theme_simplelogin_imageupload($variables) {
$element = $variables['element'];
$opt = '';
if ($element['fid']['#value'] != 0) {
$uri = file_load($element['fid']['#value'])->uri;
$array = array(
'style_name' => 'thumbnail',
'path' => $uri,
'getsize' => FALSE,
);
$opt .= '<div>' . theme('image_style', $array) . '</div>';
}
if ($element['fid']['#value'] != 0) {
$element['filename']['#markup'] .= ' <span class="file-size">(' . format_size($element['#file']->filesize) . ')</span> ';
}
$opt .= drupal_render_children($element);
return $opt;
}