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-bb-compatibility.php

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

77 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Beaver Builder page builder compatibility
4 *
5 * @package CartFlows
6 */
7
8 if ( ! class_exists( 'Cartflows_BB_Compatibility' ) ) :
9
10 /**
11 * Class for Beaver Builder page builder compatibility
12 */
13 class Cartflows_BB_Compatibility {
14
15 /**
16 * Member Variable
17 *
18 * @var instance
19 */
20 private static $instance;
21
22 /**
23 * Initiator
24 *
25 * @since 1.1.4
26 */
27 public static function get_instance() {
28 if ( ! isset( self::$instance ) ) {
29 self::$instance = new self;
30 }
31 return self::$instance;
32 }
33
34 /**
35 * Constructor
36 *
37 * @since 1.1.4
38 */
39 public function __construct() {
40 add_filter( 'fl_builder_post_types', array( $this, 'post_types' ) );
41 add_action( 'admin_init', array( $this, 'disable_rediraction' ), 99 );
42 }
43
44 /**
45 * Disable Beaver Builder Redirection after plugin install.
46 *
47 * @since 1.1.4
48 *
49 * @return void
50 */
51 function disable_rediraction() {
52 delete_transient( '_fl_builder_activation_admin_notice' );
53 }
54
55 /**
56 * Add beaver builder support for step post type.
57 *
58 * @since 1.1.4
59 *
60 * @param array $post_types container Post types.
61 * @return array
62 */
63 public function post_types( $post_types ) {
64
65 $post_types[] = 'cartflows_step';
66
67 return $post_types;
68 }
69 }
70
71 /**
72 * Kicking this off by calling 'get_instance()' method
73 */
74 Cartflows_BB_Compatibility::get_instance();
75
76 endif;
77