function fivestar_forms in Fivestar 6
Same name and namespace in other branches
- 5 fivestar.module \fivestar_forms()
- 6.2 fivestar.module \fivestar_forms()
Implementation of hook_forms().
This is necessary when multiple fivestar forms appear on the same page, each requiring a separate form_id, but all using the same underlying callbacks.
File
- ./
fivestar.module, line 1033 - A simple n-star voting widget, usable in other forms.
Code
function fivestar_forms($form_id, $args) {
if (strpos($form_id, 'fivestar_form') !== FALSE) {
if ($form_id == 'fivestar_form_' . $args[0] . '_' . $args[1]) {
$forms[$form_id] = array(
'callback' => 'fivestar_form',
);
return $forms;
}
}
}