You are here

function _addtocopy_library_path in Add link to copied text 7

Returns the path to the Add to Copy library.

2 calls to _addtocopy_library_path()
_addtocopy_library_path_js in ./addtocopy.module
Returns the path to the Add to Copy library js file.
_addtocopy_library_version in ./addtocopy.module
Returns version of the Add to Copy library.

File

./addtocopy.module, line 74

Code

function _addtocopy_library_path() {
  $library_path =& drupal_static(__FUNCTION__, NULL);
  if (is_null($library_path)) {
    $library_path = variable_get('addtocopy_library_path', module_exists('libraries') ? libraries_get_path('addtocopy') : 'sites/all/libraries/addtocopy');
    if (!file_exists($library_path . '/addtocopy.js')) {
      watchdog('addtocopy', 'Add to Copy library is missing.', array(), WATCHDOG_ERROR);
      $library_path = FALSE;
    }
  }
  return $library_path;
}