| @@ -361,12 +361,8 @@ | ||
| 361 | 361 | * |
| 362 | 362 | * @return bool |
| 363 | 363 | */ |
| 364 | 364 | public static function is_plugin_active( $plugin ): bool { |
| 365 | - if ( ! function_exists( 'is_plugin_active' ) ) { | |
| 366 | - require_once ABSPATH . 'wp-admin/includes/plugin.php'; | |
| 367 | - } | |
| 368 | - | |
| 369 | 365 | $plugin = self::ensure_plugin_folder( $plugin ); |
| 370 | 366 | return is_plugin_active( $plugin ); |
| 371 | 367 | } |
| 372 | 368 | |
| @@ -453,8 +449,14 @@ | ||
| 453 | 449 | return ! empty( get_option( $option_prefix . '_access_token' ) ); |
| 454 | 450 | } |
| 455 | 451 | |
| 456 | 452 | public static function is_plugin_connected_to_one_subscription(): bool { |
| 453 | + $has_one_subscription = Plugin::$instance->experiments->is_feature_active( 'e_editor_one' ); | |
| 454 | + | |
| 455 | + if ( ! $has_one_subscription ) { | |
| 456 | + return false; | |
| 457 | + } | |
| 458 | + | |
| 457 | 459 | return self::is_plugin_connected( 'elementor_one' ); |
| 458 | 460 | } |
| 459 | 461 | |
| 460 | 462 | private static function get_all_widget_content( $step, $one_subscription = false ) { |
| @@ -459,18 +461,18 @@ | ||
| 459 | 461 | |
| 460 | 462 | private static function get_all_widget_content( $step, $one_subscription = false ) { |
| 461 | 463 | if ( $one_subscription ) { |
| 462 | 464 | $steps = [ |
| 463 | - self::INSTALL => esc_html__( 'Want to create an inclusive experience? Install Web Accessibility, included in ONE, and add an accessibility widget to your site.', 'elementor' ), | |
| 464 | - self::ACTIVATE => esc_html__( 'Your ONE subscription includes Web Accessibility. Activate it to place an accessibility widget on your site.', 'elementor' ), | |
| 465 | - self::CONNECT => esc_html__( "Connect the Web Accessibility plugin to your account to access all of it's accessibility features.", 'elementor' ), | |
| 465 | + self::INSTALL => esc_html__( 'Want to create an inclusive experience? Install Ally, included in ONE, and add an accessibility widget to your site.', 'elementor' ), | |
| 466 | + self::ACTIVATE => esc_html__( 'Your ONE subscription includes Ally. Activate it to place an accessibility widget on your site.', 'elementor' ), | |
| 467 | + self::CONNECT => esc_html__( "Connect the Ally plugin to your account to access all of it's accessibility features.", 'elementor' ), | |
| 466 | 468 | self::CUSTOMIZE => esc_html__( "Customize the widget's look, position and the capabilities available for your visitors.", 'elementor' ), |
| 467 | 469 | ]; |
| 468 | 470 | } else { |
| 469 | 471 | $steps = [ |
| 470 | - self::INSTALL => esc_html__( 'Install Web Accessibility to add an accessibility widget visitors can use to navigate your site.', 'elementor' ), | |
| 471 | - self::ACTIVATE => esc_html__( 'Activate the Web Accessibility plugin to turn its accessibility features on across your site.', 'elementor' ), | |
| 472 | - self::CONNECT => esc_html__( "Connect the Web Accessibility plugin to your account to access all of it's accessibility features.", 'elementor' ), | |
| 472 | + self::INSTALL => esc_html__( 'Install Ally to add an accessibility widget visitors can use to navigate your site.', 'elementor' ), | |
| 473 | + self::ACTIVATE => esc_html__( 'Activate the Ally plugin to turn its accessibility features on across your site.', 'elementor' ), | |
| 474 | + self::CONNECT => esc_html__( "Connect the Ally plugin to your account to access all of it's accessibility features.", 'elementor' ), | |
| 473 | 475 | self::CUSTOMIZE => esc_html__( "Customize the widget's look, position and the capabilities available for your visitors.", 'elementor' ), |
| 474 | 476 | ]; |
| 475 | 477 | } |
| 476 | 478 | return $steps[ $step ]; |
| @@ -534,9 +536,9 @@ | ||
| 534 | 536 | $step = self::CUSTOMIZE; |
| 535 | 537 | } |
| 536 | 538 | |
| 537 | 539 | $data = [ |
| 538 | - 'title' => __( 'Web accessibility', 'elementor' ), | |
| 540 | + 'title' => __( 'Ally web accessibility', 'elementor' ), | |
| 539 | 541 | 'content' => self::get_all_widget_content( $step, $one_subscription ), |
| 540 | 542 | 'action_button' => self::get_ally_cta_button( $step, $one_subscription ), |
| 541 | 543 | ]; |
| 542 | 544 | |