function pwa_version_assets in Progressive Web App 7.2
Return a cache busting parameter for assets.
Parameters
$module:
Return value
mixed|string
3 calls to pwa_version_assets()
- pwa_library in ./
pwa.module - Implements hook_library().
- pwa_webpush_library in modules/
pwa_webpush/ pwa_webpush.module - Implements hook_library().
- _pwa_serviceworker_file in ./
pwa.module - Take the serviceworker template file and replace all the variables needed.
File
- ./
pwa.module, line 162
Code
function pwa_version_assets($module) {
$module_info = system_get_info('module', $module);
// Use version info to prevent issues with caching proxies.
$version = $module_info['version'] ?? 'dev';
// On dev release make sure it's different than the generic -dev version.
if (strpos($version, 'dev') !== FALSE) {
$version .= '-' . $module_info['mtime'];
}
return $version;
}