You are here

function dialog_contextual_library_alter in Dialog 7

Implement hook_library_alter().

File

modules/dialog_contextual/dialog_contextual.module, line 6

Code

function dialog_contextual_library_alter(&$libraries, $module) {

  // Add dialog_contextual.js to the page when contextual links are shown. This
  // will make the contextual links process with a dialog box.
  if ($module == 'contextual') {
    $libraries['contextual-links']['dependencies'][] = array(
      'dialog',
      'dialog',
    );
    $libraries['contextual-links']['js'][drupal_get_path('module', 'dialog_contextual') . '/dialog_contextual.js'] = array();
  }
}