PluginProbe
Elementor Website Builder – more than just a page builder / 3.26.4
Elementor Website Builder – more than just a page builder v3.26.4
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/admin-bar/module.php +2 -25 4.2.33.26.4 View file →
@@ -65,14 +65,13 @@
65 65 true
66 66 );
67 67
68 68 // This is a core script of WordPress, it is not required to pass the 'ver' argument.
69 - // We should add dependencies to make sure that 'elementor-admin-bar' is loaded before 'admin-bar'.
70 - wp_enqueue_script(
69 + wp_enqueue_script( // phpcs:ignore WordPress.WP.EnqueuedResourceParameters
71 70 'admin-bar',
72 71 null,
73 72 [ 'elementor-admin-bar' ],
74 - false, // phpcs:ignore WordPress.WP.EnqueuedResourceParameters
73 + false,
75 74 true
76 75 );
77 76
78 77 $this->print_config( 'elementor-admin-bar' );
@@ -133,28 +132,8 @@
133 132 }, $this->documents ),
134 133 ];
135 134 }
136 135
137 - public function add_clear_cache_in_admin_bar( $admin_bar_config ): array {
138 - if ( current_user_can( 'manage_options' ) ) {
139 - $clear_cache_url = add_query_arg(
140 - [
141 - '_wpnonce' => wp_create_nonce( 'elementor_site_clear_cache' ),
142 - ],
143 - admin_url( 'admin-post.php?action=elementor_site_clear_cache' ),
144 - );
145 -
146 - $admin_bar_config['elementor_edit_page']['children'][] = [
147 - 'id' => 'elementor_site_clear_cache',
148 - 'title' => esc_html__( 'Clear Files & Data', 'elementor' ),
149 - 'sub_title' => esc_html__( 'Site', 'elementor' ),
150 - 'href' => $clear_cache_url,
151 - ];
152 - }
153 -
154 - return $admin_bar_config;
155 - }
156 -
157 136 /**
158 137 * Module constructor.
159 138 */
160 139 public function __construct() {
@@ -159,8 +138,6 @@
159 138 */
160 139 public function __construct() {
161 140 add_action( 'elementor/frontend/before_get_builder_content', [ $this, 'add_document_to_admin_bar' ], 10, 2 );
162 141 add_action( 'wp_footer', [ $this, 'enqueue_scripts' ], 11 /* after third party scripts */ );
163 -
164 - add_filter( 'elementor/frontend/admin_bar/settings', [ $this, 'add_clear_cache_in_admin_bar' ], 500 );
165 142 }
166 143 }