function _gathercontent_tablesorter_mottie_version in GatherContent 7.3
Same name and namespace in other branches
- 8 _old.gc.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'
- gathercontent_libraries_info in ./
gathercontent.module - Implements hook_libraries_info().
File
- ./
gathercontent.module, line 1620
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;
}