PluginProbe
Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder / 3.1.4
Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder v3.1.4
3.1.4 3.0.8 3.0.9 3.1.0 3.1.2 3.1.3 3.0.7 3.0.5 3.0.4 3.0.3 3.0.2 trunk 1.5.0 1.5.1 1.5.2 1.6.1 1.6.2 1.6.3 1.6.4 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 All 93 releases
← All changes | base/singleton.php +14 -2 2.0.53.1.4 View file →
@@ -2,9 +2,9 @@
2 2
3 3 namespace UltimateStoreKit\Base;
4 4
5 5 if (!defined('ABSPATH')) {
6 - exit; // Exit if accessed directly.
6 + exit; // Exit if accessed directly.
7 7 }
8 8
9 9
10 10 trait Singleton {
@@ -11,11 +11,23 @@
11 11
12 12 private static $instance;
13 13
14 14 public static function instance() {
15 - if(!self::$instance) {
15 + if (!self::$instance) {
16 16 self::$instance = new self();
17 17 }
18 18
19 19 return self::$instance;
20 + }
21 +
22 + public static function get_instance() {
23 + return self::instance();
24 + }
25 +
26 + public function __clone() {
27 + _doing_it_wrong(__FUNCTION__, esc_html__('Cheatin’ huh?', 'ultimate-store-kit'), '1.0.0');
28 + }
29 +
30 + public function __wakeup() {
31 + _doing_it_wrong(__FUNCTION__, esc_html__('Cheatin’ huh?', 'ultimate-store-kit'), '1.0.0');
20 32 }
21 33 }