PluginProbe
JetFormBuilder — Dynamic Blocks Form Builder / 3.6.4
JetFormBuilder — Dynamic Blocks Form Builder v3.6.4
3.6.5.2 3.6.5.1 3.6.5 3.6.4.2 3.6.4.1 3.6.4 3.6.3.1 3.6.3 3.6.2.2 3.6.2.1 3.6.2 3.6.1.1 3.6.1 3.6.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 All 130 releases
jetformbuilder / includes / classes / instance-trait.php
instance-trait.php
38 lines 598 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3
4 namespace Jet_Form_Builder\Classes;
5
6 // If this file is called directly, abort.
7 if ( ! defined( 'WPINC' ) ) {
8 die;
9 }
10
11 trait Instance_Trait {
12
13 public static $instance;
14
15 /**
16 * Instance.
17 *
18 * Ensures only one instance of the plugin class is loaded or can be loaded.
19 *
20 * @return Instance_Trait An instance of the class.
21 * @since 1.0.0
22 * @access public
23 * @static
24 */
25 public static function instance() {
26
27 if ( is_null( self::$instance ) ) {
28 self::$instance = new self();
29 }
30
31 return self::$instance;
32 }
33
34 public static function clear() {
35 self::$instance = null;
36 }
37 }
38