function cookies_video_preprocess_field in COOKiES Consent Management 1.0.x
Implements hook_preprocess_HOOK().
File
- modules/
cookies_video/ cookies_video.module, line 30 - Contains cookies_video.module.
Code
function cookies_video_preprocess_field(&$variables) {
$formatter = $variables["element"]["#formatter"];
if (in_array($formatter, [
'oembed',
'blazy_oembed',
])) {
_cookies_video_media_oembed_handler($variables);
}
if (in_array($formatter, [
'video_embed_field_colorbox',
'video_embed_field_lazyload',
'video_embed_field_thumbnail',
'video_embed_field_video',
'video_embed_field_video_url',
])) {
// Return early if not a handled formatter:
_cookies_video_video_embed_field_handler($variables);
}
}