You are here

function hook_fivestar_widgets in Fivestar 7.2

Same name and namespace in other branches
  1. 8 fivestar.api.php \hook_fivestar_widgets()

Implements hook_fivestar_widgets().

This hook allows other modules to create additional custom widgets for the fivestar module.

Return value

array An array of key => value pairs suitable for inclusion as the #options in a select or radios form element. Each key must be the location of a css file for a fivestar widget. Each value should be the name of the widget.

See also

fivestar_fivestar_widgets()

1 function implements hook_fivestar_widgets()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

fivestar_fivestar_widgets in ./fivestar.module
Implements hook_fivestar_widgets().
6 invocations of hook_fivestar_widgets()
FivestarTestCase::testExposedWidgetDisplay in test/fivestar.field.test
Tests changing the fivestar widget.
fivestar_field_formatter_settings_form in includes/fivestar.field.inc
Implements hook_field_formatter_settings_form().
fivestar_field_formatter_settings_summary in includes/fivestar.field.inc
Implements hook_field_formatter_settings_summary().
fivestar_field_formatter_view in includes/fivestar.field.inc
Implements hook_field_formatter_view().
fivestar_field_widget_form in includes/fivestar.field.inc
Implements hook_field_widget_form().

... See full list

File

./fivestar.api.php, line 21
Provides API documentation for the fivestar module.

Code

function hook_fivestar_widgets() {

  // Letting fivestar know about my Cool and Awesome Stars.
  $widgets = array(
    'path/to/my/awesome/fivestar/css.css' => 'Awesome Stars',
    'path/to/my/cool/fivestar/css.css' => 'Cool Stars',
  );
  return $widgets;
}