You are here

easy_social-links.tpl.php in Easy Social 7.2

Easy Social links template

Available variables:

  • $widgets array with Easy Social widget html markup.
  • $widget_type int constant indicating widget type (horizontal or vertical).

File

templates/easy_social-links.tpl.php
View source
<?php

/**
 * @file
 * Easy Social links template
 *
 * Available variables:
 * - $widgets array with Easy Social widget html markup.
 * - $widget_type int constant indicating widget type (horizontal or vertical).
 */
?>
<div class="easy_social_box clearfix <?php

echo $widget_type == EASY_SOCIAL_WIDGET_HORIZONTAL ? 'horizontal' : 'vertical';
?> easy_social_lang_<?php

echo $lang;
?>">
  <?php

$i = 0;
$n = count($widgets);
?>
  <?php

foreach ($widgets as $name => $markup) {
  ?>
    <?php

  if ($i++ === 0) {
    $class = ' first';
  }
  else {
    if ($i === $n) {
      $class = ' last';
    }
    else {
      $class = '';
    }
  }
  ?>
    <div class="easy_social-widget easy_social-widget-<?php

  echo $name;
  echo $class;
  ?>"><?php

  echo $markup;
  ?></div>
  <?php

}
?>
</div> <!-- /.easy_social_box -->