-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprintcenter.php
More file actions
83 lines (67 loc) · 1.78 KB
/
printcenter.php
File metadata and controls
83 lines (67 loc) · 1.78 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
/**
* Plugin Name: PrintCenter
* Plugin URI: http://customerprintcenter.com
* Description: Provides the server components for the Customer Print Center aspect of Grow Thrive Print
* Version: 1.0.0
* Author: Daniel J Griffiths
* Author URI: http://section214.com
* Text Domain: printcenter
*
* @package PrintCenter
* @author Daniel J Griffiths <dgriffiths@section214.com>
*/
// Exit if accessed directly
if( ! defined( 'ABSPATH' ) ) {
exit;
}
if( ! class_exists( 'PrintCenter' ) ) {
/**
* Main PrintCenter class
*
* @since 1.0.0
*/
class PrintCenter {
/**
* @access private
* @since 1.0.0
* @var PrintCenter $instance The one true PrintCenter
*/
private static $instance;
/**
* @access public
* @since 1.0.0
* @var object $loader The PrintCenter loader object
*/
public $loader;
/**
* Get active instance
*
* @access public
* @since 1.0.0
* @return self::$instance The one true PrintCenter
*/
public static function instance() {
if( ! isset( self::$instance ) && ! ( self::$instance instanceof PrintCenter ) ) {
self::$instance = new PrintCenter();
// Bootstrap the plugin
if( ! class_exists( 'PrintCenter_Loader' ) ) {
require_once 'includes/class.loader.php';
}
self::$instance->loader = new PrintCenter_Loader( __FILE__ );
}
return self::$instance;
}
}
}
/**
* The main function responsible for returning the one true PrintCenter
* instance to functions everywhere
*
* @since 1.0.0
* @return PrintCenter The one true PrintCenter
*/
function PrintCenter() {
return PrintCenter::instance();
}
add_action( 'plugins_loaded', 'printcenter', 9 );