| @@ -120,11 +120,9 @@ | ||
| 120 | 120 | private function install_compare( $version ) { |
| 121 | 121 | $installs_history = Upgrade_Manager::get_installs_history(); |
| 122 | 122 | |
| 123 | 123 | if ( empty( $installs_history ) ) { |
| 124 | - // Fresh installation: upgrade manager hasn't written history yet on this first request. | |
| 125 | - // Use the current plugin version as the effective first-install version. | |
| 126 | - return version_compare( ELEMENTOR_VERSION, $version, '>=' ); | |
| 124 | + return false; | |
| 127 | 125 | } |
| 128 | 126 | |
| 129 | 127 | $cleaned_version = preg_replace( '/-(beta|cloud|dev)\d*$/', '', key( $installs_history ) ); |
| 130 | 128 | |
| @@ -342,9 +340,8 @@ | ||
| 342 | 340 | $this->add_feature( [ |
| 343 | 341 | 'name' => 'container', |
| 344 | 342 | 'title' => esc_html__( 'Container', 'elementor' ), |
| 345 | 343 | 'description' => sprintf( |
| 346 | - /* translators: 1: Link opening tag, 2: Link closing tag, 3: Link opening tag, 4: Link closing tag, 5: Link opening tag, 6: Link closing tag */ | |
| 347 | 344 | esc_html__( 'Create advanced layouts and responsive designs with %1$sFlexbox%2$s and %3$sGrid%4$s container elements. Give it a try using the %5$sContainer playground%6$s.', 'elementor' ), |
| 348 | 345 | '<a target="_blank" href="https://go.elementor.com/wp-dash-flex-container/">', |
| 349 | 346 | '</a>', |
| 350 | 347 | '<a target="_blank" href="https://go.elementor.com/wp-dash-grid-container/">', |
| @@ -654,12 +651,9 @@ | ||
| 654 | 651 | <div class="e-experiment__title"> |
| 655 | 652 | <div class="<?php echo $indicator_classes; ?>" data-tooltip="<?php echo $indicator_tooltip; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>"></div> |
| 656 | 653 | <label class="e-experiment__title__label" for="e-experiment-<?php echo $feature['name']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>"><?php echo $feature['title']; ?></label> |
| 657 | 654 | <?php foreach ( $feature['tags'] as $tag ) { ?> |
| 658 | - <?php | |
| 659 | - $tag_classes = 'e-experiment__title__tag e-experiment__title__tag__' . $tag['type'] . ' e-editor-one'; | |
| 660 | - ?> | |
| 661 | - <span class="<?php echo esc_attr( $tag_classes ); ?>"><?php echo $tag['label']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></span> | |
| 655 | + <span class="e-experiment__title__tag e-experiment__title__tag__<?php echo $tag['type']; ?>"><?php echo $tag['label']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></span> | |
| 662 | 656 | <?php } ?> |
| 663 | 657 | <?php if ( $feature['deprecated'] ) { ?> |
| 664 | 658 | <span class="e-experiment__title__tag e-experiment__title__tag__deprecated"><?php echo esc_html__( 'Deprecated', 'elementor' ); ?></span> |
| 665 | 659 | <?php } ?> |
| @@ -730,8 +724,10 @@ | ||
| 730 | 724 | * |
| 731 | 725 | * @param array $old_feature_data |
| 732 | 726 | * @param string $new_state |
| 733 | 727 | * @param string $old_state |
| 728 | + * | |
| 729 | + * @throws Dependency_Exception If the feature dependency is not available or not active. | |
| 734 | 730 | */ |
| 735 | 731 | private function on_feature_state_change( array $old_feature_data, $new_state, $old_state ) { |
| 736 | 732 | $new_feature_data = $this->get_features( $old_feature_data['name'] ); |
| 737 | 733 | $this->validate_dependency( $new_feature_data, $new_state ); |
| @@ -748,9 +744,9 @@ | ||
| 748 | 744 | do_action( 'elementor/experiments/feature-state-change/' . $old_feature_data['name'], $old_state, $new_state ); |
| 749 | 745 | } |
| 750 | 746 | |
| 751 | 747 | /** |
| 752 | - * @throws Exceptions\Dependency_Exception If the feature dependency is not available or not active. | |
| 748 | + * @throws Dependency_Exception If the feature dependency is not available or not active. | |
| 753 | 749 | */ |
| 754 | 750 | private function validate_dependency( array $feature, $new_state ) { |
| 755 | 751 | $rollback = function ( $feature_option_key, $state ) { |
| 756 | 752 | remove_all_actions( 'add_option_' . $feature_option_key ); |
| @@ -938,9 +934,9 @@ | ||
| 938 | 934 | /** |
| 939 | 935 | * @param array $experimental_data |
| 940 | 936 | * @return array |
| 941 | 937 | * |
| 942 | - * @throws Exceptions\Dependency_Exception If the feature dependency is not initialized or depends on a hidden experiment. | |
| 938 | + * @throws Dependency_Exception If the feature dependency is not initialized or depends on a hidden experiment. | |
| 943 | 939 | */ |
| 944 | 940 | private function initialize_feature_dependencies( array $experimental_data ): array { |
| 945 | 941 | foreach ( $experimental_data['dependencies'] as $key => $dependency ) { |
| 946 | 942 | $feature = $this->get_features( $dependency ); |