| @@ -1,48 +1,53 @@ | ||
| 1 | -<?php | |
| 2 | -/** | |
| 3 | - * Flow | |
| 4 | - * | |
| 5 | - * @package CartFlows | |
| 6 | - */ | |
| 7 | - | |
| 8 | -define( 'CARTFLOWS_FLOW_DIR', CARTFLOWS_DIR . 'modules/flow/' ); | |
| 9 | -define( 'CARTFLOWS_FLOW_URL', CARTFLOWS_URL . 'modules/flow/' ); | |
| 10 | - | |
| 11 | -/** | |
| 12 | - * Initial Setup | |
| 13 | - * | |
| 14 | - * @since 1.0.0 | |
| 15 | - */ | |
| 16 | -class Cartflows_Flow { | |
| 17 | - | |
| 18 | - | |
| 19 | - /** | |
| 20 | - * Member Variable | |
| 21 | - * | |
| 22 | - * @var object instance | |
| 23 | - */ | |
| 24 | - private static $instance; | |
| 25 | - | |
| 26 | - /** | |
| 27 | - * Initiator | |
| 28 | - */ | |
| 29 | - public static function get_instance() { | |
| 30 | - if ( ! isset( self::$instance ) ) { | |
| 31 | - self::$instance = new self; | |
| 32 | - } | |
| 33 | - return self::$instance; | |
| 34 | - } | |
| 35 | - | |
| 36 | - /** | |
| 37 | - * Constructor function that initializes required actions and hooks | |
| 38 | - */ | |
| 39 | - public function __construct() { | |
| 40 | - require_once CARTFLOWS_FLOW_DIR . 'classes/class-cartflows-flow-loader.php'; | |
| 41 | - require_once CARTFLOWS_FLOW_DIR . 'classes/class-cartflows-flow-meta.php'; | |
| 42 | - } | |
| 43 | -} | |
| 44 | - | |
| 45 | -/** | |
| 46 | - * Kicking this off by calling 'get_instance()' method | |
| 47 | - */ | |
| 48 | -Cartflows_Flow::get_instance(); | |
| 1 | +<?php | |
| 2 | +/** | |
| 3 | + * Flow | |
| 4 | + * | |
| 5 | + * @package CartFlows | |
| 6 | + */ | |
| 7 | + | |
| 8 | +// Exit if accessed directly. | |
| 9 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 10 | + exit; | |
| 11 | +} | |
| 12 | +define( 'CARTFLOWS_FLOW_DIR', CARTFLOWS_DIR . 'modules/flow/' ); | |
| 13 | +define( 'CARTFLOWS_FLOW_URL', CARTFLOWS_URL . 'modules/flow/' ); | |
| 14 | + | |
| 15 | +/** | |
| 16 | + * Initial Setup | |
| 17 | + * | |
| 18 | + * @since 1.0.0 | |
| 19 | + */ | |
| 20 | +class Cartflows_Flow { | |
| 21 | + | |
| 22 | + | |
| 23 | + /** | |
| 24 | + * Member Variable | |
| 25 | + * | |
| 26 | + * @var object instance | |
| 27 | + */ | |
| 28 | + private static $instance; | |
| 29 | + | |
| 30 | + /** | |
| 31 | + * Initiator | |
| 32 | + */ | |
| 33 | + public static function get_instance() { | |
| 34 | + if ( ! isset( self::$instance ) ) { | |
| 35 | + self::$instance = new self(); | |
| 36 | + } | |
| 37 | + return self::$instance; | |
| 38 | + } | |
| 39 | + | |
| 40 | + /** | |
| 41 | + * Constructor function that initializes required actions and hooks | |
| 42 | + */ | |
| 43 | + public function __construct() { | |
| 44 | + | |
| 45 | + require_once CARTFLOWS_FLOW_DIR . 'classes/class-cartflows-step-meta-base.php'; | |
| 46 | + require_once CARTFLOWS_FLOW_DIR . 'classes/class-cartflows-flow-loader.php'; | |
| 47 | + } | |
| 48 | +} | |
| 49 | + | |
| 50 | +/** | |
| 51 | + * Kicking this off by calling 'get_instance()' method | |
| 52 | + */ | |
| 53 | +Cartflows_Flow::get_instance(); | |