# photonic/2.43/Lightboxes/Colorbox.php

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

- Page: https://pluginprobe.com/plugins/photonic/2.43/code/Lightboxes/Colorbox.php
- Raw: https://pluginprobe.com/plugins/photonic/2.43/raw/Lightboxes/Colorbox.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/Colorbox.php#L10-L20`.

```php
<?php
namespace Photonic_Plugin\Lightboxes;

require_once('Lightbox.php');

class Colorbox extends Lightbox {
	protected function __construct() {
		$this->library = 'colorbox';
		parent::__construct();
	}

	function get_photo_attributes($photo_data, $module) {
		return !empty($photo_data['video']) ? ' data-html5-href="'.$photo_data['video'].'" ': '';
	}
}
```
