library = 'featherlight';
parent::__construct();
$this->class = ['photonic-lb', 'photonic-featherlight'];
}
public function get_photo_attributes(array $photo_data, Base $module): array {
$out = parent::get_photo_attributes($photo_data, $module);
$mime = (!empty($photo['mime']) ? $photo['mime'] : 'video/mp4');
if ('google' === $module->provider && empty($photo_data['video'])) {
$out['data-featherlight-type'] = 'image';
}
elseif ('google' === $module->provider && !empty($photo_data['video'])) {
$out['data-featherlight'] = esc_attr("");
$out['data-featherlight-type'] = 'html';
}
elseif (!empty($photo_data['video'])) {
$out['data-featherlight'] = esc_attr("");
$out['data-featherlight-type'] = 'video';
}
return $out;
}
}