PluginProbe
Elementor Website Builder – more than just a page builder / 3.9.2
Elementor Website Builder – more than just a page builder v3.9.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/settings-page.php +4 -45 4.0.73.9.2 View file →
@@ -1,9 +1,7 @@
1 1 <?php
2 2 namespace Elementor;
3 3
4 -use Elementor\Plugin;
5 -
6 4 if ( ! defined( 'ABSPATH' ) ) {
7 5 exit; // Exit if accessed directly.
8 6 }
9 7
@@ -71,25 +69,8 @@
71 69 return admin_url( 'admin.php?page=' . static::PAGE_ID );
72 70 }
73 71
74 72 /**
75 - * Get settings tab URL.
76 - *
77 - * Retrieve the URL of a specific tab in the settings page.
78 - *
79 - * @since 3.23.0
80 - * @access public
81 - * @static
82 - *
83 - * @param string $tab_id The ID of the settings tab.
84 - *
85 - * @return string Settings tab URL.
86 - */
87 - final public static function get_settings_tab_url( $tab_id ): string {
88 - return admin_url( "admin.php?page=elementor-settings#tab-$tab_id" );
89 - }
90 -
91 - /**
92 73 * Settings page constructor.
93 74 *
94 75 * Initializing Elementor settings page.
95 76 *
@@ -354,12 +335,8 @@
354 335 // PHPCS - $active_class is a non-dynamic string and $sanitized_tab_id is escaped above.
355 336 echo "<div id='tab-{$sanitized_tab_id}' class='elementor-settings-form-page{$active_class}'>"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
356 337
357 338 foreach ( $tab['sections'] as $section_id => $section ) {
358 - if ( ! $this->should_render_section( $section ) ) {
359 - continue;
360 - }
361 -
362 339 $full_section_id = 'elementor_' . $section_id . '_section';
363 340
364 341 if ( ! empty( $section['label'] ) ) {
365 342 echo '<h2>' . esc_html( $section['label'] ) . '</h2>';
@@ -378,9 +355,9 @@
378 355
379 356 echo '</div>';
380 357 }
381 358
382 - submit_button( __( 'Save Changes', 'elementor' ), 'primary', 'submit', true, [ 'data-id' => 'elementor-settings-button-save-changes' ] );
359 + submit_button();
383 360 ?>
384 361 </form>
385 362 </div><!-- /.wrap -->
386 363 <?php
@@ -388,18 +365,14 @@
388 365
389 366 public function get_usage_fields() {
390 367 return [
391 368 'allow_tracking' => [
392 - 'label' => esc_html__( 'Data Sharing', 'elementor' ),
369 + 'label' => esc_html__( 'Usage Data Sharing', 'elementor' ),
393 370 'field_args' => [
394 371 'type' => 'checkbox',
395 372 'value' => 'yes',
396 373 'default' => '',
397 - 'sub_desc' => sprintf(
398 - '%1$s <a href="https://go.elementor.com/usage-data-tracking/" target="_blank">%2$s</a>',
399 - esc_html__( 'Become a super contributor by helping us understand how you use our service to enhance your experience and improve our product.', 'elementor' ),
400 - esc_html__( 'Learn more', 'elementor' )
401 - ),
374 + 'sub_desc' => esc_html__( 'Become a super contributor by opting in to share non-sensitive plugin data and to receive periodic email updates from us.', 'elementor' ) . sprintf( ' <a href="%1$s" target="_blank">%2$s</a>', 'https://go.elementor.com/usage-data-tracking/', esc_html__( 'Learn more.', 'elementor' ) ),
402 375 ],
403 376 'setting_args' => [ __NAMESPACE__ . '\Tracker', 'check_for_settings_optin' ],
404 377 ],
405 378 ];
@@ -437,9 +410,9 @@
437 410
438 411 /**
439 412 * Should it render the settings tab
440 413 *
441 - * @param array $tab
414 + * @param $tab
442 415 *
443 416 * @return bool
444 417 */
445 418 private function should_render_tab( $tab ) {
@@ -444,20 +417,6 @@
444 417 */
445 418 private function should_render_tab( $tab ) {
446 419 // BC - When 'show_if' prop is not exists, it actually should render the tab.
447 420 return ! empty( $tab['sections'] ) && ( ! isset( $tab['show_if'] ) || $tab['show_if'] );
448 - }
449 -
450 - /**
451 - * Should it render the settings section
452 - *
453 - * @param array $section
454 - *
455 - * Since 3.19.0
456 - *
457 - * @return bool
458 - */
459 - private function should_render_section( $section ) {
460 - // BC - When 'show_if' prop is not exists, it actually should render the section.
461 - return ! isset( $section['show_if'] ) || $section['show_if'];
462 421 }
463 422 }