| @@ -112,9 +112,8 @@ | ||
| 112 | 112 | $hello_theme_errors = is_object( $hello_theme->errors() ) ? $hello_theme->errors()->errors : []; |
| 113 | 113 | |
| 114 | 114 | /** @var Library $library */ |
| 115 | 115 | $library = Plugin::$instance->common->get_component( 'connect' )->get_app( 'library' ); |
| 116 | - $is_editor_one_active = Plugin::$instance->experiments->is_feature_active( 'e_editor_one' ); | |
| 117 | 116 | |
| 118 | 117 | Plugin::$instance->app->set_settings( 'onboarding', [ |
| 119 | 118 | 'eventPlacement' => 'Onboarding wizard', |
| 120 | 119 | 'onboardingAlreadyRan' => get_option( self::ONBOARDING_OPTION ), |
| @@ -126,9 +125,8 @@ | ||
| 126 | 125 | // The "Use Hello theme on my site" checkbox should be checked by default only if this condition is met. |
| 127 | 126 | 'helloOptOut' => count( $pages_and_posts->posts ) < 5, |
| 128 | 127 | 'siteName' => esc_html( $site_name ), |
| 129 | 128 | 'isUnfilteredFilesEnabled' => Uploads_Manager::are_unfiltered_uploads_enabled(), |
| 130 | - 'isEditorOneActive' => $is_editor_one_active, | |
| 131 | 129 | 'urls' => [ |
| 132 | 130 | 'kitLibrary' => Plugin::$instance->app->get_base_url() . '&source=onboarding#/kit-library?order[direction]=desc&order[by]=featuredIndex', |
| 133 | 131 | 'sitePlanner' => add_query_arg( [ |
| 134 | 132 | 'type' => 'editor', |
| @@ -179,10 +177,8 @@ | ||
| 179 | 177 | '202' => self::EXPERIMENT_EMPHASIZE_THEME_VALUE_AUDIENCE_202, |
| 180 | 178 | '401' => self::EXPERIMENT_UPDATE_COPY_VISUALS, |
| 181 | 179 | '402' => self::EXPERIMENT_REDUCE_HIERARCHY_BLANK_OPTION, |
| 182 | 180 | ], |
| 183 | - 'pageSubheading' => $is_editor_one_active ? __( 'Choose the capabilities you need to bring your vision to life', 'elementor' ) : __( 'Which Elementor Pro features do you need to bring your creative vision to life?', 'elementor' ), | |
| 184 | - 'pageHeading' => $is_editor_one_active ? __( ' Elevate your website with additional features.', 'elementor' ) : __( 'Elevate your website with additional Pro features.', 'elementor' ), | |
| 185 | 181 | ] ); |
| 186 | 182 | } |
| 187 | 183 | |
| 188 | 184 | /** |
| @@ -385,9 +381,13 @@ | ||
| 385 | 381 | if ( ! current_user_can( 'switch_themes' ) ) { |
| 386 | 382 | return $this->get_permission_error_response(); |
| 387 | 383 | } |
| 388 | 384 | |
| 389 | - $theme_slug = 'hello-elementor'; | |
| 385 | + $theme_slug = Utils::get_super_global_value( $_POST, 'theme_slug' ) ?? 'hello-biz'; // phpcs:ignore WordPress.Security.NonceVerification.Missing | |
| 386 | + $allowed_themes = [ 'hello-elementor', 'hello-biz' ]; | |
| 387 | + if ( ! in_array( $theme_slug, $allowed_themes, true ) ) { | |
| 388 | + $theme_slug = 'hello-biz'; | |
| 389 | + } | |
| 390 | 390 | |
| 391 | 391 | switch_theme( $theme_slug ); |
| 392 | 392 | |
| 393 | 393 | return [ |