You are here

function fivestar_get_tags in Fivestar 7.2

Same name and namespace in other branches
  1. 6.2 fivestar.module \fivestar_get_tags()
3 calls to fivestar_get_tags()
fivestar_field_settings_form in includes/fivestar.field.inc
Implements hook_field_settings_form().
fivestar_update_7201 in ./fivestar.install
Fixes the axis value stored for fivestar fields.
fivestar_votingapi_metadata_alter in ./fivestar.module
Implements hook_votingapi_metadata_alter().

File

./fivestar.module, line 868

Code

function fivestar_get_tags() {
  $tags_txt = variable_get('fivestar_tags', 'vote');
  $tags_exploded = explode(',', $tags_txt);
  $tags = array();
  $got_vote = FALSE;
  foreach ($tags_exploded as $tag) {
    $tag_trimmed = trim($tag);
    if ($tag_trimmed) {
      $tags[$tag_trimmed] = $tag_trimmed;
      if ($tag_trimmed == 'vote') {
        $got_vote = TRUE;
      }
    }
  }
  if (!$got_vote) {
    $tags['vote'] = 'vote';
  }
  return $tags;
}