PluginProbe
JetFormBuilder — Dynamic Blocks Form Builder / 2.1.3
JetFormBuilder — Dynamic Blocks Form Builder v2.1.3
3.6.5.2 3.6.5.1 3.6.5 3.6.4.2 3.6.4.1 3.6.4 3.6.3.1 3.6.3 3.6.2.2 3.6.2.1 3.6.2 3.6.1.1 3.6.1 3.6.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 All 130 releases
← All changes | includes/widgets/elementor-controller.php +16 -2 2.1.22.1.3 View file →
@@ -12,11 +12,20 @@
12 12
13 13 public function __construct() {
14 14 add_action( 'elementor/init', array( $this, 'setup_widgets' ) );
15 15 add_action( 'elementor/editor/after_enqueue_styles', array( $this, 'editor_styles' ) );
16 - add_action( 'elementor/widgets/widgets_registered', array( $this, 'register_widgets' ), 11 );
17 16 add_action( 'elementor/preview/enqueue_scripts', array( $this, 'enqueue_form_assets' ) );
18 17 add_action( 'elementor/elements/categories_registered', array( $this, 'register_category' ) );
18 +
19 + // compatibility with 3.7
20 + if (
21 + defined( 'ELEMENTOR_VERSION' ) &&
22 + version_compare( ELEMENTOR_VERSION, '3.5.0', '>=' )
23 + ) {
24 + add_action( 'elementor/widgets/register', array( $this, 'register_widgets' ) );
25 + } else {
26 + add_action( 'elementor/widgets/widgets_registered', array( $this, 'register_widgets' ) );
27 + }
19 28 }
20 29
21 30 public function enqueue_form_assets() {
22 31 wp_enqueue_style( 'jet-form-builder-frontend' );
@@ -73,9 +82,14 @@
73 82 }
74 83
75 84 public function register_widgets( $manager ) {
76 85 foreach ( $this->_types as $widget ) {
77 - $manager->register_widget_type( $widget );
86 + // compatibility with 3.7
87 + if ( method_exists( $manager, 'register' ) ) {
88 + $manager->register( $widget );
89 + } else {
90 + $manager->register_widget_type( $widget );
91 + }
78 92 }
79 93 }
80 94
81 95 }