← All changes
|
modules/promotions/widgets/ally-dashboard-widget.php
+3
-13
4.2.0-beta2
→
4.0.0-dev3
View file →
| @@ -1,9 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | namespace Elementor\Modules\Promotions\Widgets; |
| 4 | 4 | |
| 5 | -use Elementor\Core\Admin\Admin_Notices; | |
| 6 | 5 | use Elementor\Core\Utils\Hints; |
| 7 | 6 | use Elementor\Modules\Promotions\Module as Promotions; |
| 8 | 7 | |
| 9 | 8 | if ( ! defined( 'ABSPATH' ) ) { |
| @@ -12,8 +11,9 @@ | ||
| 12 | 11 | |
| 13 | 12 | class Ally_Dashboard_Widget { |
| 14 | 13 | public const ALLY_SCANNER_RUN = 'ea11y_dashboard_widget_scanner_run'; |
| 15 | 14 | public const ALLY_NONCE_KEY = 'ea11y_dashboard_widget_nonce'; |
| 15 | + public const ALLY_PUBLIC_URL = 'https://wordpress.org/plugins/pojo-accessibility/'; | |
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | 18 | * Check is widget already submitted |
| 19 | 19 | * |
| @@ -30,19 +30,9 @@ | ||
| 30 | 30 | */ |
| 31 | 31 | public static function ally_widget_render(): void { |
| 32 | 32 | $is_scanner_run = self::is_scanner_run(); |
| 33 | 33 | $submit_id = $is_scanner_run ? 'e-dashboard-ally-submitted' : 'e-dashboard-ally-submit'; |
| 34 | - $link = $is_scanner_run | |
| 35 | - ? Admin_Notices::add_plg_campaign_data( | |
| 36 | - Hints::get_plugin_action_url( 'pojo-accessibility' ), | |
| 37 | - [ | |
| 38 | - 'name' => 'elementor_acc_campaign', | |
| 39 | - 'campaign' => 'acc-dashboard-plg', | |
| 40 | - 'source' => 'acc-checker-dashboard-plg-install', | |
| 41 | - 'medium' => 'wp-dash', | |
| 42 | - ] | |
| 43 | - ) | |
| 44 | - : Promotions::get_ally_external_scanner_url() . '?url=' . home_url(); | |
| 34 | + $link = $is_scanner_run ? self::ALLY_PUBLIC_URL : Promotions::get_ally_external_scanner_url() . '?url=' . home_url(); | |
| 45 | 35 | ?> |
| 46 | 36 | <div class="e-dashboard-ally e-dashboard-widget"> |
| 47 | 37 | <div class="e-dashboard-ally-img"> |
| 48 | 38 | <svg width="151" height="151" viewBox="0 0 151 151" fill="none"> |
| @@ -60,9 +50,9 @@ | ||
| 60 | 50 | <?php $is_scanner_run |
| 61 | 51 | ? esc_html_e( 'Install Ally for free to fix accessibility issues directly in WordPress.', 'elementor' ) |
| 62 | 52 | : esc_html_e( 'Most sites have accessibility gaps. Run a free scan to see how yours performs.', 'elementor' ) ?> |
| 63 | 53 | </p> |
| 64 | - <a href="<?php echo esc_url( $link ); ?>" <?php echo $is_scanner_run ? '' : 'target="_blank" rel="noreferrer"'; ?> id="<?php echo esc_attr( $submit_id ); ?>" class="button button-primary"> | |
| 54 | + <a href="<?php echo esc_url( $link ); ?>" target="_blank" rel="noreferrer" id="<?php echo esc_attr( $submit_id ); ?>" class="button button-primary"> | |
| 65 | 55 | <?php $is_scanner_run |
| 66 | 56 | ? esc_html_e( 'Get it free', 'elementor' ) |
| 67 | 57 | : esc_html_e( 'Run free scan', 'elementor' ); ?> |
| 68 | 58 | </a> |