PluginProbe
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce / 1.1.15
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce v1.1.15
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 / classes / class-cartflows-divi-compatibility.php

class-cartflows-divi-compatibility.php in CartFlows – Funnel Builder & Checkout Plugin for WooCommerce 1.1.15, at classes/class-cartflows-divi-compatibility.php

56 lines 976 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Divi page builder compatibility
4 *
5 * @package CartFlows
6 */
7
8 /**
9 * Class for divi page builder compatibility
10 */
11 class Cartflows_Divi_Compatibility {
12
13 /**
14 * Member Variable
15 *
16 * @var instance
17 */
18 private static $instance;
19
20 /**
21 * Initiator
22 */
23 public static function get_instance() {
24 if ( ! isset( self::$instance ) ) {
25 self::$instance = new self;
26 }
27 return self::$instance;
28 }
29
30 /**
31 * Constructor
32 */
33 public function __construct() {
34
35 add_filter( 'cartflows_container_atts', array( $this, 'add_id_for_cartflows_container' ) );
36 }
37
38 /**
39 * Add id attribute to cartflows container which is needed to apply style to divi elements.
40 *
41 * @param array $atts container HTML attributes.
42 * @return array
43 */
44 public function add_id_for_cartflows_container( $atts ) {
45
46 $atts['id'] = 'page-container';
47
48 return $atts;
49 }
50 }
51
52 /**
53 * Kicking this off by calling 'get_instance()' method
54 */
55 Cartflows_Divi_Compatibility::get_instance();
56