function hook_rate_widget in Rate 6.2
Hook on actions done on rate widgets.
Parameters
string $op:
object $widget:
array $values Form values from rate_widget_form (on insert and update): or an arra with the keys "content_type", "content_id" and "teaser" (on load).
2 functions implement hook_rate_widget()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- rate_expiration_rate_widget in expiration/
rate_expiration.module - Implements hook_rate_widget().
- rate_preprocess_rate_widget in ./
rate.module - Preprocess function for the emotion template.
3 invocations of hook_rate_widget()
- rate_generate_widget in ./
rate.module - Generate a widget.
- rate_widget_delete_form_submit in ./
rate.admin.inc - Submit handler.
- rate_widget_form_submit in ./
rate.admin.inc - Form submit handler.
File
- ./
rate.hooks.inc, line 46
Code
function hook_rate_widget($op, &$widget, $values = NULL) {
switch ($op) {
case 'insert':
case 'update':
// Elements which are added to the $widget are saved automatically.
break;
case 'delete':
break;
case 'view':
// The $widget object may be altered here before display.
break;
}
}