PluginProbe
Photonic Gallery & Lightbox for Flickr, SmugMug & Others / 3.37
Photonic Gallery & Lightbox for Flickr, SmugMug & Others v3.37
3.37 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 All 142 releases
← All changes | photonic.php +38 -23 2.42 → 3.37 View file →
@@ -1,53 +1,68 @@
1 1 <?php
2 2 /**
3 - * Plugin Name: Photonic Gallery & Lightbox for Flickr, SmugMug, Google Photos & Others
3 + * Plugin Name: Photonic Gallery & Lightbox for Flickr, SmugMug & Others
4 4 * Plugin URI: https://aquoid.com/plugins/photonic/
5 - * Description: Extends the native gallery to support Flickr, SmugMug, Google Photos, Zenfolio and Instagram. JS libraries like Swipebox, Fancybox, PhotoSwipe, Magnific, Colorbox, PrettyPhoto, Image Lightbox, Featherlight, Lightcase and Lightgallery are supported. Photos are displayed in grids of square or circular thumbnails, or slideshows, or justified or masonry or random mosaic layouts. The plugin also extends all layout options to a regular WP gallery.
6 - * Version: 2.42
5 + * Description: Extends the native gallery to support Flickr, SmugMug and Zenfolio. JS libraries like BaguetteBox, BigPicture, Gie Lightbox, LightGallery, PhotoSwipe, Spotlight, Swipebox, Fancybox, Magnific, Colorbox, PrettyPhoto, Image Lightbox, Featherlight and Lightcase are supported. Photos are displayed in vanilla grids of thumbnails, or more fancy slideshows, or justified or masonry or random mosaic layouts. The plugin also extends all layout options to a regular WP gallery.
6 + * Version: 3.37
7 + * Requires at least: 6.2
8 + * Requires PHP: 7.4
7 9 * Author: Sayontan Sinha
8 10 * Author URI: https://mynethome.net/
9 - * License: GNU General Public License (GPL), v3 (or newer)
11 + * License: GPLv3 or later
10 12 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
11 13 * Text Domain: photonic
12 14 *
13 - * Copyright (c) 2011 - 2020 Sayontan Sinha. All rights reserved.
15 + * Copyright (c) 2011 - 2026 Sayontan Sinha. All rights reserved.
14 16 *
15 17 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
16 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17 19 */
18 20
21 +namespace Photonic_Plugin;
22 +
19 23 use Photonic_Plugin\Core\Photonic;
20 24
21 -if (!defined('PHOTONIC_VERSION')) {
22 - define('PHOTONIC_VERSION', '2.42');
23 -}
25 +class Photonic_Plugin {
26 + public function __construct() {
27 + if (!defined('PHOTONIC_VERSION')) {
28 + define('PHOTONIC_VERSION', '3.37');
29 + }
24 30
25 -define('PHOTONIC_PATH', __DIR__);
31 + define('PHOTONIC_PATH', __DIR__);
26 32
27 -if (!defined('PHOTONIC_URL')) {
28 - define('PHOTONIC_URL', plugin_dir_url(__FILE__));
29 -}
33 + if (!defined('PHOTONIC_URL')) {
34 + define('PHOTONIC_URL', plugin_dir_url(__FILE__));
35 + }
30 36
31 -$upload_dir = wp_upload_dir();
32 -if (!defined('PHOTONIC_UPLOAD_DIR')) {
33 - define('PHOTONIC_UPLOAD_DIR', trailingslashit($upload_dir['basedir']).'photonic');
34 -}
37 + $photonic_wp_upload_dir = wp_upload_dir();
38 + if (!defined('PHOTONIC_UPLOAD_DIR')) {
39 + define('PHOTONIC_UPLOAD_DIR', trailingslashit($photonic_wp_upload_dir['basedir']) . 'photonic');
40 + }
35 41
36 -if (!defined('PHOTONIC_UPLOAD_URL')) {
37 - define('PHOTONIC_UPLOAD_URL', trailingslashit($upload_dir['baseurl']).'photonic');
42 + if (!defined('PHOTONIC_UPLOAD_URL')) {
43 + define('PHOTONIC_UPLOAD_URL', trailingslashit($photonic_wp_upload_dir['baseurl']) . 'photonic');
44 + }
45 +
46 + require_once PHOTONIC_PATH . '/Core/Photonic.php';
47 + }
38 48 }
39 49
40 -require_once(PHOTONIC_PATH.'/Core/Photonic.php');
50 +new Photonic_Plugin();
41 51
42 -add_action('admin_init', 'photonic_utilities_init'); // Delaying the start from 10 to 100 so that CPTs can be picked up
43 -add_action('init', 'photonic_init', 0); // Delaying the start from 10 to 100 so that CPTs can be picked up
52 +add_action('admin_init', '\Photonic_Plugin\photonic_utilities_init');
53 +add_action('init', '\Photonic_Plugin\photonic_init', 0); // Delaying the start from 10 to 100 so that CPTs can be picked up
44 54
55 +/**
56 + * Main plugin initiation
57 + */
45 58 function photonic_init() {
46 59 global $photonic;
47 60 $photonic = new Photonic();
48 61 }
49 62
63 +/**
64 + * Loads up the utilities file
65 + */
50 66 function photonic_utilities_init() {
51 - require_once(PHOTONIC_PATH.'/Core/Utilities.php');
67 + require_once PHOTONIC_PATH . '/Core/Utilities.php';
52 68 }
53 -