-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodal-plugin.php
More file actions
35 lines (26 loc) · 849 Bytes
/
Copy pathmodal-plugin.php
File metadata and controls
35 lines (26 loc) · 849 Bytes
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
<?php
/*
* Plugin name: Dynamic Modal Pop-Up
* Description: a modal popup that changes theme and contents based on time zone. This can be added to any page via shortcode.
* Version: 1.0
* Author: Domjon24
* Author URI: https://www.dominiquekjones.com
*/
if( !defined('ABSPATH') )
{
die('You cannot be here');
}
if( !class_exists('ModalPlugin') ) //checks if plugins already running
{
class ModalPlugin{
public function __construct()
{define('MY_PLUGIN_PATH', plugin_dir_path( __FILE__ ));
define('MY_PLUGIN_URL', plugin_dir_url( __FILE__ ));
}
public function initialize()
{ include_once MY_PLUGIN_PATH . 'modal-plugin-function.php';
}
}
$ModalPlugin = new ModalPlugin;
$ModalPlugin->initialize();
}