# photonic/3.33/Lightboxes/Colorbox.php

Photonic Gallery &amp; Lightbox for Flickr, SmugMug &amp; Others, version 3.33. 27 lines.

- Page: https://pluginprobe.com/plugins/photonic/3.33/code/Lightboxes/Colorbox.php
- Raw: https://pluginprobe.com/plugins/photonic/3.33/raw/Lightboxes/Colorbox.php
- Modified: 2024-02-20T00:59:42+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/3.33/code/Lightboxes/Colorbox.php#L10-L20`.

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

```
