| @@ -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 | |
| @@ -654,12 +652,9 @@ | ||
| 654 | 652 | <div class="e-experiment__title"> |
| 655 | 653 | <div class="<?php echo $indicator_classes; ?>" data-tooltip="<?php echo $indicator_tooltip; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>"></div> |
| 656 | 654 | <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 | 655 | <?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> | |
| 656 | + <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 | 657 | <?php } ?> |
| 663 | 658 | <?php if ( $feature['deprecated'] ) { ?> |
| 664 | 659 | <span class="e-experiment__title__tag e-experiment__title__tag__deprecated"><?php echo esc_html__( 'Deprecated', 'elementor' ); ?></span> |
| 665 | 660 | <?php } ?> |
| @@ -730,8 +725,10 @@ | ||
| 730 | 725 | * |
| 731 | 726 | * @param array $old_feature_data |
| 732 | 727 | * @param string $new_state |
| 733 | 728 | * @param string $old_state |
| 729 | + * | |
| 730 | + * @throws Dependency_Exception If the feature dependency is not available or not active. | |
| 734 | 731 | */ |
| 735 | 732 | private function on_feature_state_change( array $old_feature_data, $new_state, $old_state ) { |
| 736 | 733 | $new_feature_data = $this->get_features( $old_feature_data['name'] ); |
| 737 | 734 | $this->validate_dependency( $new_feature_data, $new_state ); |
| @@ -748,9 +745,9 @@ | ||
| 748 | 745 | do_action( 'elementor/experiments/feature-state-change/' . $old_feature_data['name'], $old_state, $new_state ); |
| 749 | 746 | } |
| 750 | 747 | |
| 751 | 748 | /** |
| 752 | - * @throws Exceptions\Dependency_Exception If the feature dependency is not available or not active. | |
| 749 | + * @throws Dependency_Exception If the feature dependency is not available or not active. | |
| 753 | 750 | */ |
| 754 | 751 | private function validate_dependency( array $feature, $new_state ) { |
| 755 | 752 | $rollback = function ( $feature_option_key, $state ) { |
| 756 | 753 | remove_all_actions( 'add_option_' . $feature_option_key ); |
| @@ -938,9 +935,9 @@ | ||
| 938 | 935 | /** |
| 939 | 936 | * @param array $experimental_data |
| 940 | 937 | * @return array |
| 941 | 938 | * |
| 942 | - * @throws Exceptions\Dependency_Exception If the feature dependency is not initialized or depends on a hidden experiment. | |
| 939 | + * @throws Dependency_Exception If the feature dependency is not initialized or depends on a hidden experiment. | |
| 943 | 940 | */ |
| 944 | 941 | private function initialize_feature_dependencies( array $experimental_data ): array { |
| 945 | 942 | foreach ( $experimental_data['dependencies'] as $key => $dependency ) { |
| 946 | 943 | $feature = $this->get_features( $dependency ); |