-
Notifications
You must be signed in to change notification settings - Fork 3
/
typeit.php
55 lines (41 loc) · 1.4 KB
/
typeit.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
<?php
/**
* Plugin Name: WP TypeIt
* Plugin URI: https://typeitjs.com
* Description: Easily create and manage typewriter effects using the JavaScript utility, TypeIt.
* Version: 3.1.1
* Author: Alex MacArthur
* Author URI: https://macarthur.me
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
namespace TypeIt;
if ( !defined( 'WPINC' ) ) {
die;
}
if(!class_exists('\\TypeIt\\App')) {
require_once(ABSPATH . 'wp-admin/includes/plugin.php');
require_once(dirname(__FILE__) . '/vendor/autoload.php');
$pluginData = get_plugin_data(__FILE__);
define('WP_TYPEIT_PLUGIN_VERSION', $pluginData['Version']);
// The base URL used for serving front-end assets.
define('WP_TYPEIT_PLUGIN_BASE_URL', trailingslashit(plugins_url()) . basename(dirname(__FILE__)));
class App {
public static function go() {
$GLOBALS[__CLASS__] = new self;
return $GLOBALS[__CLASS__];
}
/**
* Instatiate necessary classes, enqueue admin scripts.
*/
public function __construct() {
$realpath = realpath(dirname(__FILE__));
require_once($realpath . '/src/hooks/block.php');
require_once($realpath . '/src/hooks/update.php');
require_once($realpath . '/src/hooks/shortcode.php');
require_once($realpath . '/src/hooks/plugin-meta.php');
require_once($realpath . '/src/hooks/enqueue-assets.php');
}
}
App::go();
}