function hook_datalayer_meta_alter in dataLayer 8
Same name and namespace in other branches
- 7 datalayer.api.php \hook_datalayer_meta_alter()
Alter the Data Layer data before it is output to the screen.
Parameters
array $properties: Data layer properties to output on entiity pages.
Related topics
File
- ./
datalayer.api.php, line 47 - Documentation for the Data Layer module.
Code
function hook_datalayer_meta_alter(array $properties) {
// EXAMPLE:
// Remove author uid if anonymous or admin.
if ($properties['uid'] == 0 || $properties['uid'] == 1) {
unset($properties['uid']);
}
}