PluginProbe
Photonic Gallery & Lightbox for Flickr, SmugMug & Others / 2.43
Photonic Gallery & Lightbox for Flickr, SmugMug & Others v2.43
3.36 3.35 3.34 3.33 2.19 2.20 2.21 2.22 2.23 2.24 2.25 2.26 2.27 2.28 2.29 2.30 2.31 2.32 2.33 2.34 2.40 2.41 2.42 2.43 2.44 All 141 releases
photonic / Layouts / Features / Can_Use_Lightbox.php

Can_Use_Lightbox.php in Photonic Gallery & Lightbox for Flickr, SmugMug & Others 2.43, at Layouts/Features/Can_Use_Lightbox.php

93 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Photonic_Plugin\Layouts\Features;
3
4 use Photonic_Plugin\Core\Photonic;
5 use Photonic_Plugin\Lightboxes\Colorbox;
6 use Photonic_Plugin\Lightboxes\Fancybox;
7 use Photonic_Plugin\Lightboxes\Fancybox2;
8 use Photonic_Plugin\Lightboxes\Fancybox3;
9 use Photonic_Plugin\Lightboxes\Featherlight;
10 use Photonic_Plugin\Lightboxes\Image_Lightbox;
11 use Photonic_Plugin\Lightboxes\Lightbox;
12 use Photonic_Plugin\Lightboxes\Lightcase;
13 use Photonic_Plugin\Lightboxes\Lightgallery;
14 use Photonic_Plugin\Lightboxes\Magnific;
15 use Photonic_Plugin\Lightboxes\None;
16 use Photonic_Plugin\Lightboxes\PhotoSwipe;
17 use Photonic_Plugin\Lightboxes\PrettyPhoto;
18 use Photonic_Plugin\Lightboxes\Strip;
19 use Photonic_Plugin\Lightboxes\Swipebox;
20 use Photonic_Plugin\Lightboxes\Thickbox;
21
22 trait Can_Use_Lightbox {
23 /**
24 * @return Lightbox
25 */
26 public static function get_lightbox() {
27 $map = [
28 'colorbox' => 'Colorbox.php',
29 'fancybox' => 'Fancybox.php',
30 'fancybox2' => 'Fancybox2.php',
31 'fancybox3' => 'Fancybox3.php',
32 'featherlight' => 'Featherlight.php',
33 'imagelightbox' => 'Image_Lightbox.php',
34 'lightcase' => 'Lightcase.php',
35 'lightgallery' => 'Lightgallery.php',
36 'magnific' => 'Magnific.php',
37 'photoswipe' => 'PhotoSwipe.php',
38 'prettyphoto' => 'PrettyPhoto.php',
39 'swipebox' => 'Swipebox.php',
40 'strip' => 'Strip.php',
41 'thickbox' => 'Thickbox.php',
42 'none' => 'None.php',
43 ];
44 $library = Photonic::$library;
45 require_once(PHOTONIC_PATH.'/Lightboxes/'.$map[$library]);
46 if ($library == 'colorbox') {
47 $lightbox = Colorbox::get_instance();
48 }
49 else if ($library == 'fancybox') {
50 $lightbox = Fancybox::get_instance();
51 }
52 else if ($library == 'fancybox2') {
53 $lightbox = Fancybox2::get_instance();
54 }
55 else if ($library == 'fancybox3') {
56 $lightbox = Fancybox3::get_instance();
57 }
58 else if ($library == 'featherlight') {
59 $lightbox = Featherlight::get_instance();
60 }
61 else if ($library == 'imagelightbox') {
62 $lightbox = Image_Lightbox::get_instance();
63 }
64 else if ($library == 'lightcase') {
65 $lightbox = Lightcase::get_instance();
66 }
67 else if ($library == 'lightgallery') {
68 $lightbox = Lightgallery::get_instance();
69 }
70 else if ($library == 'magnific') {
71 $lightbox = Magnific::get_instance();
72 }
73 else if ($library == 'photoswipe') {
74 $lightbox = PhotoSwipe::get_instance();
75 }
76 else if ($library == 'prettyphoto') {
77 $lightbox = PrettyPhoto::get_instance();
78 }
79 else if ($library == 'swipebox') {
80 $lightbox = Swipebox::get_instance();
81 }
82 else if ($library == 'strip') {
83 $lightbox = Strip::get_instance();
84 }
85 else if ($library == 'thickbox') {
86 $lightbox = Thickbox::get_instance();
87 }
88 else {
89 $lightbox = None::get_instance();
90 }
91 return $lightbox;
92 }
93 }