function facebook_tracking_pixel_path_codes in Facebook Tracking Pixel 8
Same name and namespace in other branches
- 7 facebook_tracking_pixel.module \facebook_tracking_pixel_path_codes()
Returns all the path codes and allows other modules to alter them.
Return value
array
1 call to facebook_tracking_pixel_path_codes()
- facebook_tracking_pixel_page_build in ./
facebook_tracking_pixel.module - Implements hook_page_build().
File
- ./
facebook_tracking_pixel.module, line 509 - facebook_tracking_pixel.module Facebook Tracking Module.
Code
function facebook_tracking_pixel_path_codes() {
$trackingpaths =& drupal_static(__FUNCTION__);
if (!$trackingpaths) {
$result = db_select('facebook_tracking_pixel_events_path', 'g')
->fields('g', [
'event_path',
'event_js_file',
'event_base_code_id',
])
->condition('event_enable', 1, '=');
$result = $result
->execute();
while ($code = $result
->fetchAssoc()) {
$trackingpaths[] = $code;
}
// Allow other modules to alter the codes.
drupal_alter('facebook_tracking_pixel', $trackingpaths);
}
return $trackingpaths;
}