88
99 final class PLUGIN_BUILD {
1010
11+ /**
12+ * @var String
13+ */
14+ protected $ version = '1.2.1 ' ;
15+
1116
17+ /**
18+ * Plugin Instance.
19+ *
20+ * @var PLUGIN_BUILD the PLUGIN Instance
21+ */
22+ protected static $ _instance ;
23+
24+
25+ /**
26+ * Text domain to be used throughout the plugin
27+ *
28+ * @var String
29+ */
1230 protected static $ text_domain = 'textdomain ' ;
13- protected static $ php_ver_allowed = '5.4 ' ;
31+
32+
33+ /**
34+ * Minimum PHP version allowed for the plugin
35+ *
36+ * @var String
37+ */
38+ protected static $ php_ver_allowed = '5.3 ' ;
39+
40+
41+ /**
42+ * DB tabble used in plugin
43+ *
44+ * @var String
45+ */
1446 protected static $ plugin_table = 'plugin_db_table_name ' ;
1547
1648
49+ /**
50+ * Plugin listing page links, along with Deactivate
51+ *
52+ * @var Array
53+ */
54+ protected static $ plugin_page_links = array (
55+ array (
56+ 'slug ' => '' ,
57+ 'label ' => ''
58+ ) );
59+
60+
61+ /**
62+ * Main Plugin Instance.
63+ *
64+ * @return PLUGIN_BUILD
65+ */
66+ public static function instance () {
67+
68+ if ( is_null ( self ::$ _instance ) ) {
69+ self ::$ _instance = new self ();
70+ self ::$ _instance ->init ();
71+ }
72+
73+ return self ::$ _instance ;
74+ }
75+
76+
1777 /**
1878 * Install plugin setup
1979 *
@@ -26,12 +86,7 @@ public function installation() {
2686 $ install = new PLUGIN_INSTALL ();
2787 $ install ->text_domain = self ::$ text_domain ;
2888 $ install ->php_ver_allowed = self ::$ php_ver_allowed ;
29- $ install ->plugin_page_links = array (
30- array (
31- 'slug ' => '' ,
32- 'label ' => ''
33- ),
34- );
89+ $ install ->plugin_page_links = self ::$ plugin_page_links ;
3590 $ install ->execute ();
3691 }
3792 }
@@ -253,7 +308,7 @@ public function helpers() {
253308 *
254309 * @return Void
255310 */
256- public function __construct () {
311+ public function init () {
257312
258313 $ this ->helpers ();
259314 $ this ->functionality ();
0 commit comments