forked from savvasha/simple-lightgallery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsimple-lightgallery.php
60 lines (50 loc) · 1.22 KB
/
simple-lightgallery.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
/**
Plugin Name: Simple lightGallery
Description: An integration of lightGallery JavaScript v1 and v2 to WordPress
Author: Savvas
Author URI: https://profiles.wordpress.org/savvasha/
Version: 1.7.2
Requires at least: 5.3
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl.html
*/
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) exit;
if ( ! class_exists( 'Simple_lightGallery' ) ) :
/**
* Main Simple lightGallery Class
*
* @class Simple_lightGallery
* @version 1.7.2
*/
class Simple_lightGallery {
/**
* Constructor
*/
public function __construct() {
// Define constants
$this->define_constants();
// Include required files
$this->includes();
}
/**
* Define constants
*/
private function define_constants() {
if ( !defined( 'simplelightGallery_PLUGIN_BASE' ) )
define( 'simplelightGallery_PLUGIN_BASE', plugin_basename( __FILE__ ) );
}
/**
* Include required files
*/
private function includes() {
//load the needed frontend files
include( dirname( __FILE__ ) . '/includes/class-slg-front.php' );
// load the admin settings page
include( dirname( __FILE__ ) . '/includes/class-slg-admin.php' );
}
}
endif;
new Simple_lightGallery();