You are here

function hook_js_server_info_alter in JS Callback Handler 7.2

Alters registered JS server information.

Parameters

array $servers: An associative array, passed by reference, where the keys are server machine names and the value is the server info array.

See also

hook_js_server_info()

1 invocation of hook_js_server_info_alter()
js_server_info in ./js.module
Provides server information provided by modules.

File

./js.api.php, line 249
This file contains no working PHP code; it exists to provide documentation for this module's API.

Code

function hook_js_server_info_alter(array &$servers) {

  // Use a file to provide rewrite example.
  $path = drupal_get_path('module', 'my_module') . '/js-rewrites.conf';
  $callbacks['apache']['rewrite'] = file_get_contents($path);
}