PluginProbe
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce / 3.1.1
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce v3.1.1
3.3.0 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.1 trunk 1.0.4 1.1.0 1.1.0.1 1.1.1 1.1.10 1.1.11 1.1.12 1.1.13 1.1.14 1.1.15 1.1.16 1.1.17 1.1.18 1.1.19 1.1.2 All 162 releases
cartflows / modules / gutenberg / classes / class-cartflows-block-loader.php

class-cartflows-block-loader.php in CartFlows – Funnel Builder & Checkout Plugin for WooCommerce 3.1.1, at modules/gutenberg/classes/class-cartflows-block-loader.php

79 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Cartflows Blocks Loader.
4 *
5 * @package Cartflows
6 */
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit; // Exit if accessed directly.
10 }
11
12 if ( ! class_exists( 'Cartflows_Block_Loader' ) ) {
13
14 /**
15 * Class Cartflows_Block_Loader.
16 */
17 final class Cartflows_Block_Loader {
18
19 /**
20 * Member Variable
21 *
22 * @var 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
38 */
39 public function __construct() {
40
41 define( 'CF_TABLET_BREAKPOINT', '976' );
42 define( 'CF_MOBILE_BREAKPOINT', '767' );
43
44 $this->load_plugin();
45 }
46
47 /**
48 * Loads plugin files.
49 *
50 * @since 1.6.15
51 *
52 * @return void
53 */
54 public function load_plugin() {
55
56 if ( ! function_exists( 'is_plugin_active' ) ) {
57 include_once ABSPATH . 'wp-admin/includes/plugin.php';
58 }
59
60 $is_spectra_active = is_plugin_active( 'ultimate-addons-for-gutenberg/ultimate-addons-for-gutenberg.php' );
61
62 require_once CARTFLOWS_DIR . 'modules/gutenberg/classes/class-cartflows-gb-helper.php';
63 require_once CARTFLOWS_DIR . 'modules/gutenberg/classes/class-cartflows-gutenberg-editor.php';
64 require_once CARTFLOWS_DIR . 'modules/gutenberg/classes/class-cartflows-init-blocks.php';
65
66 if ( ! $is_spectra_active ) {
67 require_once CARTFLOWS_DIR . 'modules/gutenberg/classes/class-cartflows-spectra-compatibility.php';
68 }
69 if ( wcf()->is_woo_active ) {
70 require_once CARTFLOWS_DIR . 'modules/gutenberg/dist/blocks/order-detail-form/class-wcfb-order-detail-form.php';
71 require_once CARTFLOWS_DIR . 'modules/gutenberg/dist/blocks/checkout-form/class-wcfb-checkout-form.php';
72 require_once CARTFLOWS_DIR . 'modules/gutenberg/dist/blocks/optin-form/class-wcfb-optin-form.php';
73 }
74 }
75 }
76 Cartflows_Block_Loader::get_instance();
77 }
78
79