function commons_origins_rate_button__commons_like in Drupal Commons 7.3
Overrides hook_rate_button() for commons_like.
File
- themes/
commons/ commons_origins/ template.php, line 821 - Process theme data.
Code
function commons_origins_rate_button__commons_like($variables) {
$text = $variables['text'];
$href = $variables['href'];
$class = $variables['class'];
static $id = 0;
$id++;
$classes = 'rate-button';
if ($class) {
$classes .= ' ' . $class;
}
if (empty($href)) {
// Widget is disabled or closed.
return '<span class="' . $classes . '" id="rate-button-' . $id . '">' . '<span class="element-invisible">' . check_plain($text) . '</span>' . '</span>';
}
else {
return '<a class="' . $classes . '" id="rate-button-' . $id . '" rel="nofollow" href="' . htmlentities($href) . '" title="' . check_plain($text) . '">' . '<span class="element-invisible">' . check_plain($text) . '</span>' . '</a>';
}
}