PluginProbe
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell / 2.8.16
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell v2.8.16
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 / class-manager.php

class-manager.php in WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell 2.8.16, at includes/core/widgets/class-manager.php

49 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Widgets manager
4 *
5 * @package
6 */
7 namespace WPFunnels\Widgets;
8
9 use WPFunnels\Base_Manager;
10 use WPFunnels\Traits\SingletonTrait;
11 use WPFunnels\Widgets\Gutenberg\BlockTypes\Gutenberg_Editor;
12 use WPFunnels\Wpfnl_functions;
13
14 class Wpfnl_Widgets_Manager extends Base_Manager
15 {
16
17 use SingletonTrait;
18
19 private $widgets = [];
20
21 public function init()
22 {
23 $modules_namespace_prefix = $this->get_namespace_prefix();
24 $builders = $this->get_builders();
25
26 foreach ($builders as $builder) {
27 $class_name = str_replace('-', ' ', $builder);
28 $class_name = str_replace(' ', '', ucwords($class_name));
29 $class_name = $modules_namespace_prefix . '\\Widgets\\' . $class_name . '\Manager';
30 $this->widgets[$builder] = $class_name::instance();
31 }
32 }
33
34
35 public function get_builders()
36 {
37 $builder = array(
38 'elementor',
39 'gutenberg',
40 'diviModules',
41 );
42 $oxygen_capability = Wpfnl_functions::oxygen_builder_version_capability();
43 if ($oxygen_capability){
44 array_push($builder,'oxygen');
45 }
46 return apply_filters('wpfunnels/builders',$builder);
47 }
48 }
49