You are here

function _rate_load_widget in Rate 7.2

Load the widget include file.

Parameters

object $widget_info: Widget info from _rate_get_widgets().

1 call to _rate_load_widget()
rate_field_prepare_view in ./rate.module
Implements hook_field_prepare_view().

File

./rate.module, line 337
Main module file for the Rate module.

Code

function _rate_load_widget($widget_info) {

  // Load the dependencies first.
  module_load_include('inc', 'rate', 'classes/widget');
  module_load_include('inc', 'rate', 'classes/button');

  // Load the widget class file.
  if (!empty($widget_info->file)) {
    $file = drupal_get_path('module', $widget_info->module) . '/' . $widget_info->file;
    include_once $file;
  }
}