You are here

function views_bulk_operations_init in Views Bulk Operations (VBO) 6.3

Same name and namespace in other branches
  1. 6 views_bulk_operations.module \views_bulk_operations_init()

Implementation of hook_init().

File

./views_bulk_operations.module, line 175
Allows operations to be performed on items selected in a view.

Code

function views_bulk_operations_init() {

  // Reset selection if we're not in the view anymore.
  if (!isset($_SESSION['vbo_values'][$_GET['q']])) {
    unset($_SESSION['vbo_values']);
  }

  // Automatically include the action files.
  $files = file_scan_directory(drupal_get_path('module', 'views_bulk_operations'), '(.*).action.inc$');
  if ($files) {
    foreach ($files as $file) {
      require_once $file->filename;
    }
  }
}