templates
2 years ago
autoupdate_banner.php
2 years ago
cdn_page.php
2 years ago
customer_support.php
2 years ago
deactivation_popup.php
2 years ago
post_custom_column.php
2 years ago
referral_program_page.php
2 years ago
settings_basic.php
11 months ago
settings_connect.php
3 years ago
settings_view.php
1 year ago
two_black_friday.php
3 years ago
two_header.php
3 years ago
white_label_view.php
2 years ago
settings_connect.php
135 lines
| 1 | <?php |
| 2 | |
| 3 | $two_php_not_compatible = defined('TWO_INCOMPATIBLE_ERROR') && TWO_INCOMPATIBLE_ERROR; |
| 4 | $two_connect_link_a = $two_php_not_compatible ? '' : \TenWebOptimizer\OptimizerUtils::get_tenweb_connection_link(); |
| 5 | |
| 6 | $two_login_link = $two_php_not_compatible ? '' : \TenWebOptimizer\OptimizerUtils::get_tenweb_connection_link( |
| 7 | 'sign-up', |
| 8 | ['has_account' => '1'] |
| 9 | ); |
| 10 | $two_connection_error = defined('TWO_INCOMPATIBLE_WARNING') && TWO_INCOMPATIBLE_WARNING; |
| 11 | |
| 12 | /* incompatibility check is just for case if user's php version is lower than needed |
| 13 | * and we don't want to require Transient class to avoid php errors |
| 14 | */ |
| 15 | if (defined('TWO_INCOMPATIBLE_ERROR') && TWO_INCOMPATIBLE_ERROR) { |
| 16 | $status = 'sign_up'; // phpcs:ignore |
| 17 | } else { |
| 18 | $subscription_id = \TenWebWpTransients\OptimizerTransients::get('tenweb_subscription_id'); |
| 19 | |
| 20 | if ($subscription_id) { |
| 21 | $status = 'connect'; // phpcs:ignore |
| 22 | } else { |
| 23 | $status = 'sign_up'; // phpcs:ignore |
| 24 | } |
| 25 | }?> |
| 26 | |
| 27 | <div class="two-container disconnected" dir="ltr"> |
| 28 | <?php |
| 29 | include_once 'two_header.php'; |
| 30 | ?> |
| 31 | <div class="two-body-container"> |
| 32 | <?php |
| 33 | if ($two_php_not_compatible || $two_connection_error) { |
| 34 | global $two_incompatible_errors; |
| 35 | |
| 36 | foreach ($two_incompatible_errors as $two_incompatible_error) { |
| 37 | ?> |
| 38 | <div class="two-error"> |
| 39 | <img src="<?php echo esc_url(TENWEB_SO_URL); ?>/assets/images/error.svg" alt="Error" class="two-error-img" /> |
| 40 | <b><?php echo esc_html($two_incompatible_error['title']); ?></b> <?php echo esc_html($two_incompatible_error['message']); ?> |
| 41 | </div> |
| 42 | <?php |
| 43 | } |
| 44 | } |
| 45 | ?> |
| 46 | <div class="two-body"> |
| 47 | <div class="two-greeting"> |
| 48 | <img src="<?php echo esc_url(TENWEB_SO_URL); ?>/assets/images/waving_hand.png" alt="Hey" class="two-waving-hand" /> |
| 49 | <?php _e('Hello!', 'tenweb-speed-optimizer'); ?> |
| 50 | </div> |
| 51 | <div class="two-plugin-status"> |
| 52 | <?php _e('Welcome to ' . esc_html(TWO_SO_ORGANIZATION_NAME) . ' Website Booster', 'tenweb-speed-optimizer'); ?> |
| 53 | </div> |
| 54 | <div class="two-plugin-description"> |
| 55 | <?php _e('Follow these steps to get started:', 'tenweb-speed-optimizer'); ?> |
| 56 | </div> |
| 57 | <div class="two-steps"> |
| 58 | <div class="two-step two-step-1"> |
| 59 | <div class="two-step-check"> |
| 60 | <div class="two-step-check-inner two-check"></div> |
| 61 | </div> |
| 62 | <div class="two-step-title"> |
| 63 | <?php _e('Step 1', 'tenweb-speed-optimizer'); ?> |
| 64 | </div> |
| 65 | <div class="two-step-body"> |
| 66 | <div class="two-step-header"> |
| 67 | <?php _e('Connect your website to ' . esc_html(TWO_SO_ORGANIZATION_NAME), 'tenweb-speed-optimizer'); ?> |
| 68 | </div> |
| 69 | <div class="two-step-description"> |
| 70 | <?php _e('Sign up and connect your website to ' . esc_html(TWO_SO_ORGANIZATION_NAME), 'tenweb-speed-optimizer'); ?> |
| 71 | <br> |
| 72 | <?php _e(' to enable the ' . esc_html(TWO_SO_ORGANIZATION_NAME) . ' Booster service.', 'tenweb-speed-optimizer'); ?> |
| 73 | </div> |
| 74 | </div> |
| 75 | </div> |
| 76 | <div class="two-step two-step-2"> |
| 77 | <div class="two-step-check"> |
| 78 | <div class="two-step-check-inner two-flash"></div> |
| 79 | </div> |
| 80 | <div class="two-step-title"> |
| 81 | <?php _e('Step 2', 'tenweb-speed-optimizer'); ?> |
| 82 | </div> |
| 83 | <div class="two-step-body"> |
| 84 | <div class="two-step-header"> |
| 85 | <?php _e('Optimize your website’s frontend', 'tenweb-speed-optimizer'); ?> |
| 86 | </div> |
| 87 | <div class="two-step-description"> |
| 88 | <?php _e('Automatically optimize the frontend of your site,', 'tenweb-speed-optimizer'); ?> |
| 89 | <br> |
| 90 | <?php _e('get a 90+ PageSpeed and pass Core Web Vitals.', 'tenweb-speed-optimizer'); ?> |
| 91 | </div> |
| 92 | </div> |
| 93 | </div> |
| 94 | </div> |
| 95 | <?php |
| 96 | if ($status == 'connect') { |
| 97 | if (!empty(get_site_option(TENWEB_PREFIX . '_access_token'))) {?> |
| 98 | <a href="#" |
| 99 | class="two-button two-button-connect two-button-io-active-optimize" <?php disabled(!$two_login_link); ?>> |
| 100 | <?php _e('Optimize', 'tenweb-speed-optimizer'); ?> |
| 101 | </a> |
| 102 | <?php } else { ?> |
| 103 | <a href="<?php echo esc_url($two_login_link); ?>" |
| 104 | class="two-button two-button-connect" <?php disabled(!$two_login_link); ?>> |
| 105 | <?php _e('CONNECT', 'tenweb-speed-optimizer'); ?> |
| 106 | </a> |
| 107 | <?php } |
| 108 | } elseif ($status == 'sign_up') { |
| 109 | ?> |
| 110 | <a href="<?php echo esc_url($two_connect_link_a); ?>" |
| 111 | class="two-button two-button-connect" <?php disabled(!$two_connect_link_a); ?>> |
| 112 | <?php _e('SIGN UP & CONNECT', 'tenweb-speed-optimizer'); ?> |
| 113 | </a> |
| 114 | <?php |
| 115 | } |
| 116 | ?> |
| 117 | </div> |
| 118 | <div class="two-image-container"> |
| 119 | <img src="<?php echo esc_url(TENWEB_SO_URL); ?>/assets/images/welcome_image.png" alt="Welcome to <?php echo esc_html(TWO_SO_ORGANIZATION_NAME); ?>" class="two-welcome-image" /> |
| 120 | <div class="two-image-description"> |
| 121 | <div class="two-image-description-header"> |
| 122 | <?php _e('Access the benefits of ' . esc_html(TWO_SO_ORGANIZATION_NAME) . ' Booster', 'tenweb-speed-optimizer'); ?> |
| 123 | </div> |
| 124 | <ul class="two-image-description-list"> |
| 125 | <li><?php _e('90+ PageSpeed score', 'tenweb-speed-optimizer'); ?></li> |
| 126 | <li><?php _e('Image optimization', 'tenweb-speed-optimizer'); ?></li> |
| 127 | <li><?php _e('Improved Core Web Vitals', 'tenweb-speed-optimizer'); ?></li> |
| 128 | <li><?php _e('Full caching', 'tenweb-speed-optimizer'); ?></li> |
| 129 | </ul> |
| 130 | </div> |
| 131 | </div> |
| 132 | </div> |
| 133 | </div> |
| 134 | |
| 135 |