You are here

function theme_rotating_banner_slide_textbox in Rotating Banner 7.2

Same name and namespace in other branches
  1. 7 rotating_banner.module \theme_rotating_banner_slide_textbox()

Creates the HTML structure that displays the set of textboxes wraps it in a link if a link exists

Parameters

{Array} variables: Array of properties associated with the textboxes include the textbox text

Return value

{String} A string that when printed produces HTML.

1 theme call to theme_rotating_banner_slide_textbox()
theme_rotating_banner_slide in ./rotating_banner.module
Creates HTML for the individual slides

File

./rotating_banner.module, line 641

Code

function theme_rotating_banner_slide_textbox($variables) {
  $position = $variables['position'];
  $content = filter_xss_admin($variables['content']);
  $type = $variables['type'];
  $link = $variables['link'];
  if ($position) {
    $position += array(
      'top' => 0,
      'left' => 0,
      'right' => 0,
      'bottom' => 0,
    );
    $style = "top: " . $position['top'] . "%; left: " . $position['left'] . "%; right: " . $position['right'] . "%; bottom: " . $position['bottom'] . "%;";
  }
  if ($link) {
    $content = l($content, $link, array(
      'html' => TRUE,
      'attributes' => array(
        'class' => array(
          'rb-link',
        ),
      ),
    ));
  }
  return '<div style="' . $style . '" class="' . $type . ' rb-textbox-wrapper"><div class="rb-textbox">' . $content . '</div></div>';
}