| 1 |
<?php |
| 2 |
namespace Photonic_Plugin\Lightboxes; |
| 3 |
|
| 4 |
require_once('Lightbox.php'); |
| 5 |
|
| 6 |
class Lightgallery extends Lightbox { |
| 7 |
protected function __construct() { |
| 8 |
$this->library = 'lightgallery'; |
| 9 |
parent::__construct(); |
| 10 |
} |
| 11 |
|
| 12 |
function get_photo_attributes($photo_data, $module) { |
| 13 |
$download = !empty($photo_data['download']) ? 'data-download-url="'.$photo_data['download'].'" ' : ''; |
| 14 |
$video = !empty($photo_data['video']) ? ' data-html="#photonic-video-'.$module->provider.'-'.$module->gallery_index.'-'.$photo_data['id'].'" ' : ''; |
| 15 |
return ' data-sub-html="'.$photo_data['title'].'" '.$video.$download; |
| 16 |
} |
| 17 |
} |