PluginProbe
Elementor Website Builder – more than just a page builder / 3.20.3
Elementor Website Builder – more than just a page builder v3.20.3
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 4.1.0-dev1 4.0.7 All 451 releases
← All changes | modules/notifications/module.php +7 -6 4.2.13.20.3 View file →
@@ -38,10 +38,8 @@
38 38 'e-admin-notifications',
39 39 'elementorNotifications',
40 40 $this->get_app_js_config()
41 41 );
42 -
43 - wp_set_script_translations( 'e-editor-notifications', 'elementor' );
44 42 }, 5 /* Before Elementor's admin enqueue scripts */ );
45 43
46 44 add_action( 'elementor/editor/v2/scripts/enqueue', [ $this, 'enqueue_editor_scripts' ] );
47 45 add_action( 'elementor/editor/after_enqueue_scripts', [ $this, 'enqueue_editor_scripts' ] );
@@ -54,12 +52,17 @@
54 52 'elementor-editor',
55 53 'elementor-v2-ui',
56 54 'elementor-v2-icons',
57 55 'elementor-v2-query',
58 - 'elementor-v2-editor-app-bar',
59 56 'wp-i18n',
60 57 ];
61 58
59 + $is_editor_v2 = current_action() === 'elementor/editor/v2/scripts/enqueue';
60 +
61 + if ( $is_editor_v2 ) {
62 + $deps[] = 'elementor-v2-editor-app-bar';
63 + }
64 +
62 65 wp_enqueue_script(
63 66 'e-editor-notifications',
64 67 $this->get_js_assets_url( 'editor-notifications' ),
65 68 $deps,
@@ -71,13 +74,11 @@
71 74 'e-editor-notifications',
72 75 'elementorNotifications',
73 76 $this->get_app_js_config()
74 77 );
75 -
76 - wp_set_script_translations( 'e-editor-notifications', 'elementor' );
77 78 }
78 79
79 - private function get_app_js_config(): array {
80 + private function get_app_js_config() : array {
80 81 return [
81 82 'is_unread' => Options::has_unread_notifications(),
82 83 ];
83 84 }