PluginProbe
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell / 3.12.5
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell v3.12.5
3.13.3 3.13.2 3.13.1 3.13.0 3.12.13 3.12.12 3.12.11 3.12.10 3.12.9 3.12.8 3.12.7 3.12.6 3.12.5 3.12.4 3.12.3 3.12.1 3.12.2 3.12.0 3.11.1 3.11.0 3.10.9 3.10.8 3.10.7 3.10.6 2.8.16 All 261 releases
wpfunnels / includes / core / widgets / divi-modules / classes / class-wpfnl-divi-builder.php

class-wpfnl-divi-builder.php in WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell 3.12.5, at includes/core/widgets/divi-modules/classes/class-wpfnl-divi-builder.php

67 lines 1.3 KB
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 class
4 *
5 * @package
6 */
7
8 namespace WPFunnels\Widgets\DiviModules;
9
10 use WPFunnels\Traits\SingletonTrait;
11
12 /**
13 * Class Wpfnl_Divi_Editor
14 *
15 * @package WPFunnels\Widgets\DiviModules
16 *
17 * @since 2.2.6
18 */
19 class Wpfnl_Divi_Editor {
20
21 use SingletonTrait;
22
23 public function __construct() {
24 $this->divi_compatibility();
25 }
26
27
28 private function divi_compatibility() {
29 add_filter( 'wpfunnels/page_container_atts', array( $this, 'add_id_to_wpf_page_container' ) );
30 add_filter( 'et_builder_plugin_compat_path_wpfunnels', array( $this, 'register_et_builder_compatibility_class' ), 10, 2 );
31 }
32
33
34 /**
35 * Add id to wpf page container which is needed. Because divi apply styles
36 * to modules based on this id
37 *
38 * @param $atts
39 *
40 * @return array
41 *
42 * @since 2.2.6
43 */
44 public function add_id_to_wpf_page_container($atts) {
45 $atts['id'] = 'page-container';
46 return $atts;
47 }
48
49
50 /**
51 * Register ET builder compatibility class
52 *
53 * @param $path
54 * @param $plugin_name
55 *
56 * @return string
57 *
58 * @since 2.3.4
59 */
60 public function register_et_builder_compatibility_class( $path, $plugin_name ) {
61 if( 'wpfunnels' === $plugin_name ) {
62 return WPFNL_DIR . 'includes/core/widgets/divi-modules/classes/class-wpfnl-divi-theme-compatibility.php';
63 }
64 return $path;
65 }
66 }
67