You are here

function _gathercontent_tablesorter_mottie_version in GatherContent 8

Same name and namespace in other branches
  1. 7.3 gathercontent.module \_gathercontent_tablesorter_mottie_version()

Custom version callback for tablesorter jquery plugin library.

Return value

string Version of the installed jquery.tablesorter plugin.

1 string reference to '_gathercontent_tablesorter_mottie_version'
gc_libraries_info in ./_old.gc.module
Implements hook_libraries_info().

File

./_old.gc.module, line 827

Code

function _gathercontent_tablesorter_mottie_version() {
  $lib_version = FALSE;
  $lib_path = libraries_get_path('tablesorter-mottie');
  $lib_packages_json = file_get_contents($lib_path . '/package.json');
  if ($lib_packages_json !== FALSE) {
    $lib_packages_info = json_decode($lib_packages_json, TRUE);
    if (is_array($lib_packages_info) && isset($lib_packages_info['version'])) {
      $lib_version = $lib_packages_info['version'];
    }
  }
  return $lib_version;
}