-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugin.php
66 lines (54 loc) · 1.56 KB
/
plugin.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
61
62
63
64
65
66
<?php
/*
Plugin Name: Marcus Hiles Wistia Shortcodes
Plugin URI: https://www.marcus-hiles.com/plugins
Description: Easy embeds for Wistia Videos
Version: 1.3
Author: Marcus Hiles
Author URI: https://www.marcus-hiles.com
Text Domain: marcus-hiles-wistia-shortcodes
Domain Path: /languages
*/
if ( __FILE__ == $_SERVER['SCRIPT_FILENAME'] ) { exit; }
if ( ! class_exists('Marcus_Hiles_Wistia_Embeds_Plugin' ) ):
class Marcus_Hiles_Wistia_Embeds_Plugin {
private static $instance;
public $dir_path = '';
public $dir_url = '';
/**
* Main Instance
*
*/
public static function instance() {
if ( ! isset( self::$instance ) && ! ( self::$instance instanceof Marcus_Hiles_Wistia_Embeds_Plugin ) ) {
self::$instance = new Marcus_Hiles_Wistia_Embeds_Plugin;
self::$instance->init();
}
return self::$instance;
}
/**
* Init
*
*/
public function init() {
$this->dir_path = plugin_dir_path( __FILE__ );
$this->dir_uri = plugin_dir_url( __FILE__ );
require_once( trailingslashit( $this->dir_path ) . 'wistia-video.php' );
require_once( trailingslashit( $this->dir_path ) . 'shortcodes.php' );
if( function_exists( 'parse_blocks' ) || function_exists( 'gutenberg_parse_blocks' ) ){
require_once( trailingslashit( $this->dir_path ) . 'gutenberg/index.php' );
}
}
}
endif;
/**
* The main Marcus_Hiles_Wistia_Embeds_Plugin function.
*
* @return object
*/
function Marcus_Hiles_Wistia_Embeds_Plugin() {
if( class_exists( 'Marcus_Hiles_Wistia_Embeds_Plugin' ) ){
return Marcus_Hiles_Wistia_Embeds_Plugin::instance();
}
}
Marcus_Hiles_Wistia_Embeds_Plugin();