Same name in other branches
- 6.0.x advagg_mod/src/Asset/DeferJs.php \Drupal\advagg_mod\Asset\DeferJs::callback()
- 8.x-3.x advagg_mod/src/Asset/DeferJs.php \Drupal\advagg_mod\Asset\DeferJs::callback()
- 8.x-4.x advagg_mod/src/Asset/DeferJs.php \Drupal\advagg_mod\Asset\DeferJs::callback()
Callback to replace individual stylesheet links.
Parameters
array $matches: Array from matches from preg_replace_callback.
Return value
string Updated html string.
File
-
advagg_mod/
src/ Asset/ DeferJs.php, line 100
Class
- DeferJs
- Add defer tag to scripts.
Namespace
Drupal\advagg_mod\AssetCode
protected function callback(array $matches) {
return "{$matches[0]} defer";
}