You are here

function itoggle_get_js in iToggle 7

Return the JS filename for iToggle plugin. This was borrowed from the Colorbox module

@link http://drupal.org/project/colorbox

Return value

String the JS filename for iToggle plugin

2 calls to itoggle_get_js()
itoggle_get_version in includes/itoggle.inc
Return the version of iToggle plugin that is installed.
itoggle_include_itoggle in includes/itoggle.inc
Helper function Includes itoggle plugin and default style

File

includes/itoggle.inc, line 47
iToggle module include.

Code

function itoggle_get_js() {
  $library_path = itoggle_get_path();
  if (file_exists($library_path . '/engage.itoggle.js') && file_exists($library_path . '/engage.itoggle-min.js')) {
    $itoggle_js_map = array(
      'none' => 'engage.itoggle.js',
      'min' => 'engage.itoggle-min.js',
    );
    $itoggle_js = $itoggle_js_map[variable_get_value('itoggle_compression_type')];
    return "{$library_path}/{$itoggle_js}";
  }
}