function theme_rotating_banner_slide_image in Rotating Banner 7
Same name and namespace in other branches
- 7.2 rotating_banner.module \theme_rotating_banner_slide_image()
Creates an image tag and wraps it in a link if a link exists
Parameters
{Array} variables: Array of properties associated with the background image
Return value
{String} A string that when printed produces HTML.
1 theme call to theme_rotating_banner_slide_image()
- theme_rotating_banner_slide in ./
rotating_banner.module - Creates HTML for the individual slides
File
- ./
rotating_banner.module, line 666
Code
function theme_rotating_banner_slide_image($variables) {
$background_image = $variables['background_image'];
$link = $variables['link'];
$output = '';
if ($background_image) {
$image_url = file_create_url($background_image->uri);
}
if ($image_url) {
$output .= "\n" . theme('image', array(
'path' => $image_url,
'attributes' => array(
'class' => 'rb-background-image',
),
));
}
if ($link) {
$output = l($output, $link, array(
'html' => TRUE,
'attributes' => array(
'class' => array(
'rb-link',
),
),
));
}
return $output;
}