PluginProbe
Elementor Website Builder – more than just a page builder / 3.1.2
Elementor Website Builder – more than just a page builder v3.1.2
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 | includes/settings/tools.php +92 -231 4.2.43.1.2 View file →
@@ -1,13 +1,7 @@
1 1 <?php
2 2 namespace Elementor;
3 3
4 -use Elementor\Core\Admin\Menu\Admin_Menu_Manager;
5 -use Elementor\Core\Kits\Manager;
6 -use Elementor\Includes\Settings\AdminMenuItems\Tools_Menu_Item;
7 -use Elementor\Modules\EditorOne\Classes\Menu_Data_Provider;
8 -use Elementor\Includes\Settings\AdminMenuItems\Editor_One_Tools_Menu;
9 -
10 4 if ( ! defined( 'ABSPATH' ) ) {
11 5 exit; // Exit if accessed directly.
12 6 }
13 7
@@ -20,10 +14,8 @@
20 14 * @since 1.0.0
21 15 */
22 16 class Tools extends Settings_Page {
23 17
24 - const CAPABILITY = 'manage_options';
25 -
26 18 /**
27 19 * Settings page ID for Elementor tools.
28 20 */
29 21 const PAGE_ID = 'elementor-tools';
@@ -28,80 +20,45 @@
28 20 */
29 21 const PAGE_ID = 'elementor-tools';
30 22
31 23 /**
32 - * Clear cache.
24 + * Register admin menu.
33 25 *
34 - * Delete post meta containing the post CSS file data. And delete the actual
35 - * CSS files from the upload directory.
26 + * Add new Elementor Tools admin menu.
36 27 *
37 - * Fired by `wp_ajax_elementor_clear_cache` action.
28 + * Fired by `admin_menu` action.
38 29 *
39 30 * @since 1.0.0
40 31 * @access public
41 32 */
42 - public function ajax_elementor_clear_cache() {
43 - check_ajax_referer( 'elementor_clear_cache', '_nonce' );
44 -
45 - if ( ! current_user_can( static::CAPABILITY ) ) {
46 - wp_send_json_error( 'Permission denied' );
47 - }
48 -
49 - Plugin::$instance->files_manager->clear_cache();
50 -
51 - wp_send_json_success();
33 + public function register_admin_menu() {
34 + add_submenu_page(
35 + Settings::PAGE_ID,
36 + __( 'Tools', 'elementor' ),
37 + __( 'Tools', 'elementor' ),
38 + 'manage_options',
39 + self::PAGE_ID,
40 + [ $this, 'display_settings_page' ]
41 + );
52 42 }
53 43
54 - public function admin_post_elementor_site_clear_cache() {
55 - check_ajax_referer( 'elementor_site_clear_cache' );
56 -
57 - if ( ! current_user_can( static::CAPABILITY ) ) {
58 - wp_die( 'Permission denied' );
59 - }
60 -
61 - Plugin::$instance->files_manager->clear_cache();
62 -
63 - $http_referer = wp_get_raw_referer();
64 - if ( empty( $http_referer ) ) {
65 - $http_referer = admin_url( 'admin.php?page=' . static::PAGE_ID );
66 - }
67 -
68 - wp_safe_redirect( $http_referer );
69 - die;
70 - }
71 -
72 44 /**
73 - * Recreate kit.
45 + * Clear cache.
74 46 *
75 - * Recreate default kit (only when default kit does not exist).
47 + * Delete post meta containing the post CSS file data. And delete the actual
48 + * CSS files from the upload directory.
76 49 *
77 - * Fired by `wp_ajax_elementor_recreate_kit` action.
50 + * Fired by `wp_ajax_elementor_clear_cache` action.
78 51 *
79 52 * @since 1.0.0
80 53 * @access public
81 54 */
82 - public function ajax_elementor_recreate_kit() {
83 - check_ajax_referer( 'elementor_recreate_kit', '_nonce' );
55 + public function ajax_elementor_clear_cache() {
56 + check_ajax_referer( 'elementor_clear_cache', '_nonce' );
84 57
85 - if ( ! current_user_can( static::CAPABILITY ) ) {
86 - wp_send_json_error( 'Permission denied' );
87 - }
58 + Plugin::$instance->files_manager->clear_cache();
88 59
89 - $kit = Plugin::$instance->kits_manager->get_active_kit();
90 -
91 - if ( $kit->get_id() ) {
92 - wp_send_json_error( [ 'message' => esc_html__( 'There\'s already an active kit.', 'elementor' ) ], 400 );
93 - }
94 -
95 - $created_default_kit = Plugin::$instance->kits_manager->create_default();
96 -
97 - if ( ! $created_default_kit ) {
98 - wp_send_json_error( [ 'message' => esc_html__( 'An error occurred while trying to create a kit.', 'elementor' ) ], 500 );
99 - }
100 -
101 - update_option( Manager::OPTION_ACTIVE, $created_default_kit );
102 -
103 - wp_send_json_success( esc_html__( 'New kit have been created successfully', 'elementor' ) );
60 + wp_send_json_success();
104 61 }
105 62
106 63 /**
107 64 * Replace URLs.
@@ -116,15 +73,11 @@
116 73 */
117 74 public function ajax_elementor_replace_url() {
118 75 check_ajax_referer( 'elementor_replace_url', '_nonce' );
119 76
120 - if ( ! current_user_can( static::CAPABILITY ) ) {
121 - wp_send_json_error( 'Permission denied' );
122 - }
77 + $from = ! empty( $_POST['from'] ) ? $_POST['from'] : '';
78 + $to = ! empty( $_POST['to'] ) ? $_POST['to'] : '';
123 79
124 - $from = Utils::get_super_global_value( $_POST, 'from' ) ?? '';
125 - $to = Utils::get_super_global_value( $_POST, 'to' ) ?? '';
126 -
127 80 try {
128 81 $results = Utils::replace_urls( $from, $to );
129 82 wp_send_json_success( $results );
130 83 } catch ( \Exception $e ) {
@@ -144,45 +97,28 @@
144 97 */
145 98 public function post_elementor_rollback() {
146 99 check_admin_referer( 'elementor_rollback' );
147 100
148 - if ( ! static::can_user_rollback_versions() ) {
149 - wp_die( esc_html__( 'Not allowed to rollback versions', 'elementor' ) );
150 - }
151 -
152 101 $rollback_versions = $this->get_rollback_versions();
153 - $version = Utils::get_super_global_value( $_GET, 'version' );
154 -
155 - if ( empty( $version ) || ! in_array( $version, $rollback_versions, true ) ) {
156 - wp_die( esc_html__( 'An error occurred, the selected version is invalid. Try selecting different version.', 'elementor' ) );
102 + if ( empty( $_GET['version'] ) || ! in_array( $_GET['version'], $rollback_versions ) ) {
103 + wp_die( __( 'Error occurred, The version selected is invalid. Try selecting different version.', 'elementor' ) );
157 104 }
158 105
159 - /**
160 - * Filter to allow override the rollback process.
161 - * Should return an instance of `Rollback` class.
162 - *
163 - * @since 3.16.0
164 - *
165 - * @param Rollback|null $rollback The rollback instance.
166 - * @param string $version The version to roll back to.
167 - */
168 - $rollback = apply_filters( 'elementor/settings/rollback', null, $version );
106 + $plugin_slug = basename( ELEMENTOR__FILE__, '.php' );
169 107
170 - if ( ! ( $rollback instanceof Rollback ) ) {
171 - $plugin_slug = basename( ELEMENTOR__FILE__, '.php' );
172 -
173 - $rollback = new Rollback( [
174 - 'version' => $version,
108 + $rollback = new Rollback(
109 + [
110 + 'version' => $_GET['version'],
175 111 'plugin_name' => ELEMENTOR_PLUGIN_BASE,
176 112 'plugin_slug' => $plugin_slug,
177 - 'package_url' => sprintf( 'https://downloads.wordpress.org/plugin/%s.%s.zip', $plugin_slug, $version ),
178 - ] );
179 - }
113 + 'package_url' => sprintf( 'https://downloads.wordpress.org/plugin/%s.%s.zip', $plugin_slug, $_GET['version'] ),
114 + ]
115 + );
180 116
181 117 $rollback->run();
182 118
183 119 wp_die(
184 - '', esc_html__( 'Rollback to Previous Version', 'elementor' ), [
120 + '', __( 'Rollback to Previous Version', 'elementor' ), [
185 121 'response' => 200,
186 122 ]
187 123 );
188 124 }
@@ -197,58 +133,41 @@
197 133 */
198 134 public function __construct() {
199 135 parent::__construct();
200 136
201 - add_action( 'elementor/editor-one/menu/register', function ( Menu_Data_Provider $menu_data_provider ) {
202 - $this->register_editor_one_menu( $menu_data_provider );
203 - } );
137 + add_action( 'admin_menu', [ $this, 'register_admin_menu' ], 205 );
204 138
205 - add_action( 'wp_ajax_elementor_clear_cache', [ $this, 'ajax_elementor_clear_cache' ] );
206 - add_action( 'admin_post_elementor_site_clear_cache', [ $this, 'admin_post_elementor_site_clear_cache' ] );
207 - add_action( 'wp_ajax_elementor_replace_url', [ $this, 'ajax_elementor_replace_url' ] );
208 - add_action( 'wp_ajax_elementor_recreate_kit', [ $this, 'ajax_elementor_recreate_kit' ] );
139 + if ( ! empty( $_POST ) ) {
140 + add_action( 'wp_ajax_elementor_clear_cache', [ $this, 'ajax_elementor_clear_cache' ] );
141 + add_action( 'wp_ajax_elementor_replace_url', [ $this, 'ajax_elementor_replace_url' ] );
142 + }
209 143
210 144 add_action( 'admin_post_elementor_rollback', [ $this, 'post_elementor_rollback' ] );
211 145 }
212 146
213 - private function register_editor_one_menu( Menu_Data_Provider $menu_data_provider ) {
214 - $menu_data_provider->register_menu( new Editor_One_Tools_Menu() );
215 - }
216 -
217 - public function get_warning_span( string $text ): string {
218 - $color = 'var(--e-one-palette-error-main)';
219 - return sprintf( '<span style="color: %s;">%s</span>', esc_attr( $color ), esc_html( $text ) );
220 - }
221 -
222 147 private function get_rollback_versions() {
223 148 $rollback_versions = get_transient( 'elementor_rollback_versions_' . ELEMENTOR_VERSION );
224 -
225 149 if ( false === $rollback_versions ) {
226 150 $max_versions = 30;
227 151
228 - $versions = apply_filters( 'elementor/settings/rollback/versions', [] );
152 + require_once ABSPATH . 'wp-admin/includes/plugin-install.php';
229 153
230 - if ( empty( $versions ) ) {
231 - require_once ABSPATH . 'wp-admin/includes/plugin-install.php';
154 + $plugin_information = plugins_api(
155 + 'plugin_information', [
156 + 'slug' => 'elementor',
157 + ]
158 + );
232 159
233 - $plugin_information = plugins_api(
234 - 'plugin_information', [
235 - 'slug' => 'elementor',
236 - ]
237 - );
160 + if ( empty( $plugin_information->versions ) || ! is_array( $plugin_information->versions ) ) {
161 + return [];
162 + }
238 163
239 - if ( empty( $plugin_information->versions ) || ! is_array( $plugin_information->versions ) ) {
240 - return [];
241 - }
164 + krsort( $plugin_information->versions );
242 165
243 - uksort( $plugin_information->versions, 'version_compare' );
244 - $versions = array_keys( array_reverse( $plugin_information->versions ) );
245 - }
246 -
247 166 $rollback_versions = [];
248 167
249 168 $current_index = 0;
250 - foreach ( $versions as $version ) {
169 + foreach ( $plugin_information->versions as $version => $download_link ) {
251 170 if ( $max_versions <= $current_index ) {
252 171 break;
253 172 }
254 173
@@ -254,15 +173,8 @@
254 173
255 174 $lowercase_version = strtolower( $version );
256 175 $is_valid_rollback_version = ! preg_match( '/(trunk|beta|rc|dev)/i', $lowercase_version );
257 176
258 - /**
259 - * Is rollback version is valid.
260 - *
261 - * Filters the check whether the rollback version is valid.
262 - *
263 - * @param bool $is_valid_rollback_version Whether the rollback version is valid.
264 - */
265 177 $is_valid_rollback_version = apply_filters(
266 178 'elementor/settings/tools/rollback/is_valid_rollback_version',
267 179 $is_valid_rollback_version,
268 180 $lowercase_version
@@ -275,9 +187,9 @@
275 187 if ( version_compare( $version, ELEMENTOR_VERSION, '>=' ) ) {
276 188 continue;
277 189 }
278 190
279 - ++$current_index;
191 + $current_index++;
280 192 $rollback_versions[] = $version;
281 193 }
282 194
283 195 set_transient( 'elementor_rollback_versions_' . ELEMENTOR_VERSION, $rollback_versions, WEEK_IN_SECONDS );
@@ -303,28 +215,28 @@
303 215 $rollback_html .= "<option value='{$version}'>$version</option>";
304 216 }
305 217 $rollback_html .= '</select>';
306 218
307 - $tabs = [
219 + return [
308 220 'general' => [
309 - 'label' => esc_html__( 'General', 'elementor' ),
221 + 'label' => __( 'General', 'elementor' ),
310 222 'sections' => [
311 223 'tools' => [
312 224 'fields' => [
313 225 'clear_cache' => [
314 - 'label' => esc_html__( 'Elementor Cache', 'elementor' ),
226 + 'label' => __( 'Regenerate CSS', 'elementor' ),
315 227 'field_args' => [
316 228 'type' => 'raw_html',
317 - 'html' => sprintf( '<button data-nonce="%s" data-id="elementor-tools-general-button-clear-files-data" class="button elementor-button-spinner" id="elementor-clear-cache-button">%s</button>', wp_create_nonce( 'elementor_clear_cache' ), esc_html__( 'Clear Files & Data', 'elementor' ) ),
318 - 'desc' => esc_html__( "Clear outdated CSS files and cached data in the database (rendered HTML, JS/CSS assets, etc.). We'll regenerate those files the next time someone visits any page on your website.", 'elementor' ),
229 + 'html' => sprintf( '<button data-nonce="%s" class="button elementor-button-spinner" id="elementor-clear-cache-button">%s</button>', wp_create_nonce( 'elementor_clear_cache' ), __( 'Regenerate Files', 'elementor' ) ),
230 + 'desc' => __( 'Styles set in Elementor are saved in CSS files in the uploads folder. Recreate those files, according to the most recent settings.', 'elementor' ),
319 231 ],
320 232 ],
321 233 'reset_api_data' => [
322 - 'label' => esc_html__( 'Sync Library', 'elementor' ),
234 + 'label' => __( 'Sync Library', 'elementor' ),
323 235 'field_args' => [
324 236 'type' => 'raw_html',
325 - 'html' => sprintf( '<button data-nonce="%s" data-id="elementor-tools-general-button-sync-library" class="button elementor-button-spinner" id="elementor-library-sync-button">%s</button>', wp_create_nonce( 'elementor_reset_library' ), esc_html__( 'Sync Library', 'elementor' ) ),
326 - 'desc' => esc_html__( 'Elementor Library automatically updates on a daily basis. You can also manually update it by clicking on the sync button.', 'elementor' ),
237 + 'html' => sprintf( '<button data-nonce="%s" class="button elementor-button-spinner" id="elementor-library-sync-button">%s</button>', wp_create_nonce( 'elementor_reset_library' ), __( 'Sync Library', 'elementor' ) ),
238 + 'desc' => __( 'Elementor Library automatically updates on a daily basis. You can also manually update it by clicking on the sync button.', 'elementor' ),
327 239 ],
328 240 ],
329 241 ],
330 242 ],
@@ -330,31 +242,29 @@
330 242 ],
331 243 ],
332 244 ],
333 245 'replace_url' => [
334 - 'label' => esc_html__( 'Replace URL', 'elementor' ),
246 + 'label' => __( 'Replace URL', 'elementor' ),
335 247 'sections' => [
336 248 'replace_url' => [
337 249 'callback' => function() {
250 + $intro_text = sprintf(
251 + /* translators: %s: Codex URL */
252 + __( '<strong>Important:</strong> It is strongly recommended that you <a target="_blank" href="%s">backup your database</a> before using Replace URL.', 'elementor' ),
253 + 'http://go.elementor.com/wordpress-backups/'
254 + );
255 + $intro_text = '<div>' . $intro_text . '</div>';
256 +
338 257 echo '<h2>' . esc_html__( 'Replace URL', 'elementor' ) . '</h2>';
339 - printf(
340 - '<p><strong>%1$s</strong> %2$s</p>',
341 - esc_html__( 'Important:', 'elementor' ),
342 - sprintf(
343 - /* translators: 1: Link open tag, 2: Link close tag. */
344 - esc_html__( 'It is strongly recommended to %1$sbackup the database%2$s before using replacing URLs.', 'elementor' ),
345 - '<a href="https://go.elementor.com/wordpress-backups/" target="_blank">',
346 - '</a>'
347 - )
348 - );
258 + echo $intro_text;
349 259 },
350 260 'fields' => [
351 261 'replace_url' => [
352 - 'label' => esc_html__( 'Update Site Address (URL)', 'elementor' ),
262 + 'label' => __( 'Update Site Address (URL)', 'elementor' ),
353 263 'field_args' => [
354 264 'type' => 'raw_html',
355 - 'html' => sprintf( '<input type="text" name="from" placeholder="https://old.example.com" class="large-text"><input type="text" name="to" placeholder="https://new.example.com" class="large-text"><button data-nonce="%s" data-id="elementor-tools-replace_url-button-replace-url" class="button elementor-button-spinner" id="elementor-replace-url-button">%s</button>', wp_create_nonce( 'elementor_replace_url' ), esc_html__( 'Replace URL', 'elementor' ) ),
356 - 'desc' => esc_html__( 'Enter your old and new URLs for your WordPress installation, to update all Elementor data (Relevant for domain transfers or move to \'HTTPS\').', 'elementor' ),
265 + 'html' => sprintf( '<input type="text" name="from" placeholder="http://old-url.com" class="medium-text"><input type="text" name="to" placeholder="http://new-url.com" class="medium-text"><button data-nonce="%s" class="button elementor-button-spinner" id="elementor-replace-url-button">%s</button>', wp_create_nonce( 'elementor_replace_url' ), __( 'Replace URL', 'elementor' ) ),
266 + 'desc' => __( 'Enter your old and new URLs for your WordPress installation, to update all Elementor data (Relevant for domain transfers or move to \'HTTPS\').', 'elementor' ),
357 267 ],
358 268 ],
359 269 ],
360 270 ],
@@ -360,65 +270,58 @@
360 270 ],
361 271 ],
362 272 ],
363 273 'versions' => [
364 - 'show_if' => static::can_user_rollback_versions(),
365 - 'label' => esc_html__( 'Version Control', 'elementor' ),
274 + 'label' => __( 'Version Control', 'elementor' ),
366 275 'sections' => [
367 276 'rollback' => [
368 - 'label' => esc_html__( 'Rollback to Previous Version', 'elementor' ),
277 + 'label' => __( 'Rollback to Previous Version', 'elementor' ),
369 278 'callback' => function() {
370 279 $intro_text = sprintf(
371 - /* translators: %s: Elementor version. */
372 - esc_html__( 'Experiencing an issue with Elementor version %s? Rollback to a previous version before the issue appeared.', 'elementor' ),
280 + /* translators: %s: Elementor version */
281 + __( 'Experiencing an issue with Elementor version %s? Rollback to a previous version before the issue appeared.', 'elementor' ),
373 282 ELEMENTOR_VERSION
374 283 );
375 284 $intro_text = '<p>' . $intro_text . '</p>';
376 285
377 - Utils::print_unescaped_internal_string( $intro_text );
286 + echo $intro_text;
378 287 },
379 288 'fields' => [
380 289 'rollback' => [
381 - 'label' => esc_html__( 'Rollback Version', 'elementor' ),
290 + 'label' => __( 'Rollback Version', 'elementor' ),
382 291 'field_args' => [
383 292 'type' => 'raw_html',
384 293 'html' => sprintf(
385 - $rollback_html . '<button data-placeholder-text="%1$s v{VERSION}" data-placeholder-url="%2$s" class="button elementor-button-spinner elementor-rollback-button">%1$s</button>',
386 - esc_html__( 'Reinstall', 'elementor' ),
387 - wp_nonce_url( admin_url( 'admin-post.php?action=elementor_rollback&version=VERSION' ), 'elementor_rollback' )
294 + $rollback_html . '<a data-placeholder-text="' . __( 'Reinstall', 'elementor' ) . ' v{VERSION}" href="#" data-placeholder-url="%s" class="button elementor-button-spinner elementor-rollback-button">%s</a>',
295 + wp_nonce_url( admin_url( 'admin-post.php?action=elementor_rollback&version=VERSION' ), 'elementor_rollback' ),
296 + __( 'Reinstall', 'elementor' )
388 297 ),
389 - 'desc' => $this->get_warning_span( esc_html__( 'Warning: Please back up your database before making the rollback.', 'elementor' ) ),
298 + 'desc' => '<span style="color: red;">' . __( 'Warning: Please backup your database before making the rollback.', 'elementor' ) . '</span>',
390 299 ],
391 300 ],
392 301 ],
393 302 ],
394 303 'beta' => [
395 - 'show_if' => $this->display_beta_tester(),
396 - 'label' => esc_html__( 'Become a Beta Tester', 'elementor' ),
304 + 'label' => __( 'Become a Beta Tester', 'elementor' ),
397 305 'callback' => function() {
398 - echo '<p>' .
399 - esc_html__( 'Turn-on Beta Tester, to get notified when a new beta version of Elementor or Elementor Pro is available. The Beta version will not install automatically. You always have the option to ignore it.', 'elementor' ) .
400 - '</p>';
401 - echo '<p>' . sprintf(
402 - /* translators: 1: Link open tag, 2: Link close tag. */
403 - esc_html__( '%1$sClick here%2$s %3$sto join our first-to-know email updates.%4$s', 'elementor' ),
404 - '<a id="beta-tester-first-to-know" class="elementor-become-a-beta-tester" href="#">',
405 - '</a>',
406 - '<span class="elementor-become-a-beta-tester">',
407 - '</span>',
408 - ) . '</p>';
306 + $intro_text = __( 'Turn-on Beta Tester, to get notified when a new beta version of Elementor or Elementor Pro is available. The Beta version will not install automatically. You always have the option to ignore it.', 'elementor' );
307 + $intro_text = '<p>' . $intro_text . '</p>';
308 + $newsletter_opt_in_text = sprintf( __( '<a id="beta-tester-first-to-know" href="%s">Click here</a> to join our first-to-know email updates.', 'elementor' ), '#' );
309 +
310 + echo $intro_text;
311 + echo $newsletter_opt_in_text;
409 312 },
410 313 'fields' => [
411 314 'beta' => [
412 - 'label' => esc_html__( 'Beta Tester', 'elementor' ),
315 + 'label' => __( 'Beta Tester', 'elementor' ),
413 316 'field_args' => [
414 317 'type' => 'select',
415 - 'std' => 'no',
318 + 'default' => 'no',
416 319 'options' => [
417 - 'no' => esc_html__( 'Disable', 'elementor' ),
418 - 'yes' => esc_html__( 'Enable', 'elementor' ),
320 + 'no' => __( 'Disable', 'elementor' ),
321 + 'yes' => __( 'Enable', 'elementor' ),
419 322 ],
420 - 'desc' => $this->get_warning_span( esc_html__( 'Please Note: We do not recommend updating to a beta version on production sites.', 'elementor' ) ),
323 + 'desc' => '<span style="color: red;">' . __( 'Please Note: We do not recommend updating to a beta version on production sites.', 'elementor' ) . '</span>',
421 324 ],
422 325 ],
423 326 ],
424 327 ],
@@ -424,20 +327,8 @@
424 327 ],
425 328 ],
426 329 ],
427 330 ];
428 -
429 - if ( ! Plugin::$instance->kits_manager->get_active_kit()->get_id() ) {
430 - $tabs['general']['sections']['tools']['fields']['recreate_kit'] = [
431 - 'label' => esc_html__( 'Recreate Kit', 'elementor' ),
432 - 'field_args' => [
433 - 'type' => 'raw_html',
434 - 'html' => sprintf( '<button data-nonce="%s" class="button elementor-button-spinner" id="elementor-recreate-kit-button">%s</button>', wp_create_nonce( 'elementor_recreate_kit' ), esc_html__( 'Recreate Kit', 'elementor' ) ),
435 - 'desc' => esc_html__( 'It seems like your site doesn\'t have any active Kit. The active Kit includes all of your Site Settings. By recreating your Kit you will able to start edit your Site Settings again.', 'elementor' ),
436 - ],
437 - ];
438 - }
439 - return $tabs;
440 331 }
441 332
442 333 /**
443 334 * Get tools page title.
@@ -449,37 +340,7 @@
449 340 *
450 341 * @return string Tools page title.
451 342 */
452 343 protected function get_page_title() {
453 - return esc_html__( 'Tools', 'elementor' );
454 - }
455 -
456 - /**
457 - * Check if the current user can access the version control tab and rollback versions.
458 - *
459 - * @return bool
460 - */
461 - public static function can_user_rollback_versions() {
462 - return current_user_can( 'activate_plugins' ) && current_user_can( 'update_plugins' );
463 - }
464 -
465 - /**
466 - * Check if the beta tester should be displayed.
467 - *
468 - * @since 3.19.0
469 - *
470 - * @return bool
471 - */
472 - public function display_beta_tester(): bool {
473 - $display_beta_tester = true;
474 - /**
475 - * Filter to allow override the display of the beta tester.
476 - *
477 - * @param bool $display_beta_tester Whether to display the beta tester.
478 - *
479 - * @since 3.19.0
480 - *
481 - * return bool
482 - */
483 - return apply_filters( 'elementor/admin/show_beta_tester', $display_beta_tester );
344 + return __( 'Tools', 'elementor' );
484 345 }
485 346 }