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
referral_program_page.php
116 lines
| 1 | <?php |
| 2 | wp_enqueue_style( |
| 3 | 'two_referral_program_page_css', |
| 4 | TENWEB_SO_URL . '/assets/css/referral_program_page.css', |
| 5 | ['two-open-sans'], |
| 6 | TENWEB_SO_VERSION |
| 7 | ); |
| 8 | wp_enqueue_script( |
| 9 | 'two_referral_program_js', |
| 10 | TENWEB_SO_URL . '/assets/js/referral_program.js', |
| 11 | ['jquery'], |
| 12 | TENWEB_SO_VERSION |
| 13 | ); |
| 14 | |
| 15 | // red icon to be visible only until first visit of page |
| 16 | if (!get_option('two_referral_visited')) { |
| 17 | update_option('two_referral_visited', 'two_referral_visited', false); |
| 18 | } |
| 19 | |
| 20 | $referral_hash = get_site_option(TENWEB_PREFIX . '_client_referral_hash'); |
| 21 | $link_to_dash = TENWEB_DASHBOARD . '/referral-system/program'; |
| 22 | $referral_link = TENWEB_SITE_URL . '/page-speed-booster/?referral_hash=' . $referral_hash; |
| 23 | $share_text = urlencode('Boost your website\'s speed with 10Web PageSpeed Booster! Try it now for lightning-fast performance and receive a $20 credit.'); |
| 24 | $referTo = [ |
| 25 | [ |
| 26 | 'link' => 'https://twitter.com/share?text=' . $share_text . '&url=' . $referral_link, |
| 27 | 'logo' => TENWEB_SO_URL . '/assets/images/Twitter.svg', |
| 28 | 'title' => 'Twitter', |
| 29 | ], |
| 30 | [ |
| 31 | 'link' => 'https://www.linkedin.com/sharing/share-offsite?mini=true&url=' . $referral_link . '&title=' . $share_text, |
| 32 | 'logo' => TENWEB_SO_URL . '/assets/images/linkedIn.svg', |
| 33 | 'title' => 'LinkedIn', |
| 34 | ], |
| 35 | [ |
| 36 | 'link' => 'https://www.reddit.com/submit?title=' . $share_text |
| 37 | . '&selftext=true&url=' . $referral_link, |
| 38 | 'logo' => TENWEB_SO_URL . '/assets/images/reddit-logo.svg', |
| 39 | 'title' => 'Reddit', |
| 40 | ], |
| 41 | [ |
| 42 | 'link' => 'https://www.facebook.com/sharer.php?u=' . $referral_link . '&p[title]=' . $share_text, |
| 43 | 'logo' => TENWEB_SO_URL . '/assets/images/facebook.svg', |
| 44 | 'title' => 'Facebook', |
| 45 | ], |
| 46 | ]; |
| 47 | $howItWorks = [ |
| 48 | [ |
| 49 | 'img' => TENWEB_SO_URL . '/assets/images/invite.png', |
| 50 | 'css' => 'min-width: 198px;', |
| 51 | 'title' => __('Invite a friend to join 10Web', 'tenweb-speed-optimizer'), |
| 52 | 'desc' => __('Share the link on your social<br> media or send it to your friends.', 'tenweb-speed-optimizer'), |
| 53 | ], |
| 54 | [ |
| 55 | 'img' => TENWEB_SO_URL . '/assets/images/gift.png', |
| 56 | 'title' => __('Gift them $20 credit', 'tenweb-speed-optimizer'), |
| 57 | 'desc' => __('They’ll get $20 credit<br> and an optimized website in minutes.', 'tenweb-speed-optimizer'), |
| 58 | ], |
| 59 | [ |
| 60 | 'img' => TENWEB_SO_URL . '/assets/images/earn.png', |
| 61 | 'css' => 'min-width: 198px;', |
| 62 | 'title' => __('Earn from each referral', 'tenweb-speed-optimizer'), |
| 63 | 'desc' => __('You will receive a $20 credit<br> for the first referral and $10<br> for each additional one.', 'tenweb-speed-optimizer'), |
| 64 | ], |
| 65 | ]; |
| 66 | ?> |
| 67 | <div class="two-wp-container"> |
| 68 | <div class="two-container-with-border"> |
| 69 | <div class="two-referral-header"> |
| 70 | <div> |
| 71 | <p class="two-page-main-title"><?php esc_html_e('Get a $20 credit for successful referrals you make.', 'tenweb-speed-optimizer'); ?></p> |
| 72 | <p class="two-page-main-desc"><?php esc_html_e('The user who you refer will also receive $20 in 10Web credit.', 'tenweb-speed-optimizer'); ?></p> |
| 73 | </div> |
| 74 | <div> |
| 75 | <a class="two-page-main-desc two-green-liner-button" href="<?php echo esc_url($link_to_dash); ?>"><?php esc_html_e('See my credit', 'tenweb-speed-optimizer'); ?></a> |
| 76 | </div> |
| 77 | </div> |
| 78 | <div class="two-referral-works"> |
| 79 | <p class="two-page-main-desc two-page-subtitle"><?php |
| 80 | echo wp_kses( |
| 81 | __('Share the referral link with your community. <br>Give them $20 credit and a chance to improve their website score.', 'tenweb-speed-optimizer'), |
| 82 | [ 'br' => [] ] |
| 83 | ); ?> |
| 84 | </p> |
| 85 | <div class="two-referral-container"> |
| 86 | <p class="two-page-main-desc" id="two-referral-link"><?php echo esc_url($referral_link, 'tenweb-speed-optimizer'); ?></p> |
| 87 | <p class="two-referral-copy two-page-main-desc"><?php esc_html_e('Copy', 'tenweb-speed-optimizer'); ?></p> |
| 88 | </div> |
| 89 | <div class="two-refer-links"> |
| 90 | <?php |
| 91 | foreach ($referTo as $refer) { ?> |
| 92 | <a class="two-refer-to" href="<?php echo esc_url($refer['link']); ?>" target="_blank"> |
| 93 | <img src="<?php echo esc_url($refer['logo']); ?>"> |
| 94 | <?php echo esc_html($refer['title']); ?> |
| 95 | </a> |
| 96 | <?php } ?> |
| 97 | </div> |
| 98 | </div> |
| 99 | </div> |
| 100 | <div class="two-container-with-border"> |
| 101 | <p class="two-page-main-title"> |
| 102 | <?php esc_html_e('Here’s how our referral program works:', 'tenweb-speed-optimizer'); ?> |
| 103 | </p> |
| 104 | <div class="two-howitworks-container"> |
| 105 | <?php |
| 106 | foreach ($howItWorks as $each) { ?> |
| 107 | <div class="two-howitworks-each" <?php echo isset($each['css']) ? 'style="' . esc_attr($each['css']) . '"' : ''; ?>> |
| 108 | <img src="<?php echo esc_url($each['img']); ?>"> |
| 109 | <p class="two-main-text two-page-small-subtitle"><?php echo esc_html($each['title']); ?></p> |
| 110 | <p class="two-main-text"><?php echo wp_kses(__($each['desc'], 'tenweb-speed-optimizer'), [ 'br' => [] ]); ?></p> |
| 111 | </div> |
| 112 | <?php } ?> |
| 113 | </div> |
| 114 | </div> |
| 115 | </div> |
| 116 |