# photonic/2.43/Lightboxes/Lightgallery.php

Photonic Gallery &amp; Lightbox for Flickr, SmugMug &amp; Others, version 2.43. 17 lines.

- Page: https://pluginprobe.com/plugins/photonic/2.43/code/Lightboxes/Lightgallery.php
- Raw: https://pluginprobe.com/plugins/photonic/2.43/raw/Lightboxes/Lightgallery.php
- Modified: 2020-05-12T15:39:52+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/photonic/2.43/code/Lightboxes/Lightgallery.php#L10-L20`.

```php
<?php
namespace Photonic_Plugin\Lightboxes;

require_once('Lightbox.php');

class Lightgallery extends Lightbox {
	protected function __construct() {
		$this->library = 'lightgallery';
		parent::__construct();
	}

	function get_photo_attributes($photo_data, $module) {
		$download = !empty($photo_data['download']) ? 'data-download-url="'.$photo_data['download'].'" ' : '';
		$video = !empty($photo_data['video']) ? ' data-html="#photonic-video-'.$module->provider.'-'.$module->gallery_index.'-'.$photo_data['id'].'" ' : '';
		return ' data-sub-html="'.$photo_data['title'].'" '.$video.$download;
	}
}
```
