PluginProbe
Elementor Website Builder – more than just a page builder / 4.1.4
Elementor Website Builder – more than just a page builder v4.1.4
4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 All 453 releases
← All changes | modules/promotions/module.php +11 -13 4.2.0-beta24.1.4 View file →
@@ -19,9 +19,9 @@
19 19 use Elementor\Modules\Promotions\Pointers\Black_Friday;
20 20 use Elementor\Modules\Promotions\PropTypes\Promotion_Prop_Type;
21 21 use Elementor\Modules\Promotions\Widgets\Ally_Dashboard_Widget;
22 22 use Elementor\Modules\Promotions\Widgets\Atomic_Form_Widget_Promotion;
23 -use Elementor\Modules\Promotions\Widgets\Collection_Loop_Widget_Promotion;
23 +use Elementor\Modules\Promotions\Widgets\Birthday_Easter_Egg_Promotion;
24 24 use Elementor\Widgets_Manager;
25 25 use Elementor\Utils;
26 26 use Elementor\Includes\EditorAssetsAPI;
27 27 use Elementor\Plugin;
@@ -38,9 +38,9 @@
38 38
39 39 const ADMIN_MENU_PROMOTIONS_PRIORITY = 120;
40 40
41 41 public static function is_active() {
42 - return ! Utils::has_pro() || ! Utils::is_license_active();
42 + return ! Utils::has_pro();
43 43 }
44 44
45 45 public function get_name() {
46 46 return 'promotions';
@@ -48,17 +48,8 @@
48 48
49 49 public function __construct() {
50 50 parent::__construct();
51 51
52 - add_filter( 'elementor/editor/localize_settings', [ $this, 'add_v4_promotions_data' ] );
53 -
54 - if ( Utils::has_pro() ) {
55 - add_action( 'elementor/editor/before_enqueue_scripts', [ $this, 'enqueue_react_data' ] );
56 - $this->register_atomic_promotions();
57 -
58 - return;
59 - }
60 -
61 52 add_action( 'admin_init', function () {
62 53 $this->handle_external_redirects();
63 54 } );
64 55
@@ -90,8 +81,14 @@
90 81 if ( Conversion_Banner::should_display_banner() ) {
91 82 new Conversion_Banner();
92 83 }
93 84
85 + add_filter( 'elementor/editor/localize_settings', [ $this, 'add_v4_promotions_data' ] );
86 +
87 + if ( Utils::has_pro() ) {
88 + return;
89 + }
90 +
94 91 add_filter( 'elementor/editor/localize_settings', [ $this, 'add_editing_panel_sticky_promotion' ] );
95 92
96 93 add_action( 'elementor/controls/register', function ( Controls_Manager $controls_manager ) {
97 94 $controls_manager->register( new Controls\Promotion_Control() );
@@ -120,9 +117,9 @@
120 117 if ( empty( $page ) ) {
121 118 return;
122 119 }
123 120
124 - if ( in_array( $page, [ 'go_elementor_pro', 'elementor-one-upgrade' ], true ) ) {
121 + if ( 'go_elementor_pro' === $page ) {
125 122 wp_redirect( Go_Pro_Promotion_Item::get_url() ); // phpcs:ignore WordPress.Security.SafeRedirect.wp_redirect_wp_redirect
126 123 die;
127 124 }
128 125 }
@@ -293,12 +290,13 @@
293 290 $config['priority'],
294 291 2
295 292 );
296 293 }
294 +
295 + ( new Birthday_Easter_Egg_Promotion() )->register();
297 296 } );
298 297
299 298 ( new Atomic_Form_Widget_Promotion() )->register();
300 - ( new Collection_Loop_Widget_Promotion() )->register();
301 299 }
302 300
303 301 public function inject_atomic_promotion_props( array $schema ): array {
304 302 foreach ( $this->get_atomic_promotion_configs() as $config ) {