v2
2 years ago
welcome-modals
3 years ago
woocommerce
2 years ago
custom-tab.php
5 years ago
help-tab.php
3 years ago
infobox.php
5 years ago
panel-content-page.php
3 years ago
panel-content.php
3 years ago
panel-field-container.php
2 years ago
panel-header.php
3 years ago
panel-nav-item.php
2 years ago
panel-nav.php
3 years ago
panel-wp-page-footer.php
3 years ago
panel-wp-page-header.php
3 years ago
premium-tab-content.php
3 years ago
premium-tab.php
3 years ago
sub-tabs-nav.php
5 years ago
premium-tab-content.php
145 lines
| 1 | <?php |
| 2 | /** |
| 3 | * The template for displaying the content of the premium tab. |
| 4 | * |
| 5 | * @var array $features List of premium features |
| 6 | * @var array $testimonials List of testimonials |
| 7 | * @var array $pricing Pricing details. |
| 8 | * @var string $landing_page_url The premium landing page URL. |
| 9 | * @var string $free_vs_premium_url The free vs premium URL. |
| 10 | * @var bool $show_free_vs_premium Show free VS premium link flag. |
| 11 | * @package YITH\PluginFramework\Templates |
| 12 | */ |
| 13 | |
| 14 | defined( 'ABSPATH' ) || exit; |
| 15 | |
| 16 | list ( $price_html, $discount_percentage ) = yith_plugin_fw_extract( $pricing, 'price_html', 'discount_percentage' ); |
| 17 | |
| 18 | $default_feature = array( |
| 19 | 'title' => '', |
| 20 | 'description' => '', |
| 21 | ); |
| 22 | $default_testimonial = array( |
| 23 | 'name' => '', |
| 24 | 'avatar' => '', |
| 25 | 'message' => '', |
| 26 | ); |
| 27 | ?> |
| 28 | |
| 29 | <div class="main-content"> |
| 30 | <div class="features"> |
| 31 | <?php foreach ( $features as $feature ) : ?> |
| 32 | <?php |
| 33 | $feature = wp_parse_args( $feature, $default_feature ); |
| 34 | ?> |
| 35 | <div class="feature"> |
| 36 | <?php if ( ! ! $feature['title'] ) : ?> |
| 37 | <div class="feature__title"> |
| 38 | <?php echo wp_kses_post( $feature['title'] ); ?> |
| 39 | |
| 40 | <?php |
| 41 | yith_plugin_fw_get_component( |
| 42 | array( |
| 43 | 'class' => 'feature__premium-tag', |
| 44 | 'type' => 'tag', |
| 45 | 'label' => _x( 'PREMIUM', 'Panel option tag', 'yith-plugin-fw' ), |
| 46 | 'color' => 'premium', |
| 47 | ), |
| 48 | true |
| 49 | ); |
| 50 | ?> |
| 51 | </div> |
| 52 | <?php endif; ?> |
| 53 | <?php if ( ! ! $feature['description'] ) : ?> |
| 54 | <div class="feature__description"><?php echo wp_kses_post( $feature['description'] ); ?></div> |
| 55 | <?php endif; ?> |
| 56 | </div> |
| 57 | <?php endforeach; ?> |
| 58 | <div> |
| 59 | <?php echo esc_html_x( '...and so much more!', 'Premium Tab', 'yith-plugin-fw' ); ?> |
| 60 | <?php if ( $show_free_vs_premium ) : ?> |
| 61 | <a href="<?php echo esc_url( $free_vs_premium_url ); ?>" target="_blank"> |
| 62 | <?php echo esc_html_x( 'Check the free vs premium features >', 'Premium Tab', 'yith-plugin-fw' ); ?> |
| 63 | </a> |
| 64 | <?php else : ?> |
| 65 | <a href="<?php echo esc_url( $landing_page_url ); ?>" target="_blank"> |
| 66 | <?php echo esc_html_x( 'Check the premium features >', 'Premium Tab', 'yith-plugin-fw' ); ?> |
| 67 | </a> |
| 68 | <?php endif; ?> |
| 69 | </div> |
| 70 | </div> |
| 71 | <div class="landing"> |
| 72 | <div class="landing__container"> |
| 73 | |
| 74 | <div class="landing__head"> |
| 75 | <?php |
| 76 | if ( $discount_percentage ) { |
| 77 | echo sprintf( |
| 78 | // translators: %s is the discount percentage. |
| 79 | esc_html_x( 'Upgrade now to get a %s%% off', 'Premium Tab', 'yith-plugin-fw' ), |
| 80 | absint( $discount_percentage ) |
| 81 | ); |
| 82 | } else { |
| 83 | echo esc_html_x( 'Upgrade now to unlock premium features', 'Premium Tab', 'yith-plugin-fw' ); |
| 84 | } |
| 85 | ?> |
| 86 | </div> |
| 87 | |
| 88 | <?php if ( $price_html ) : ?> |
| 89 | <div class="landing__pricing"> |
| 90 | <?php echo wp_kses_post( $price_html ); ?> |
| 91 | </div> |
| 92 | <?php endif; ?> |
| 93 | |
| 94 | <div class="landing__advantages"> |
| 95 | <div class="landing__advantage"><?php echo esc_html_x( 'Advanced features', 'Premium Tab', 'yith-plugin-fw' ); ?></div> |
| 96 | <div class="landing__advantage"><?php echo esc_html_x( 'Regular updates', 'Premium Tab', 'yith-plugin-fw' ); ?></div> |
| 97 | <div class="landing__advantage"><?php echo esc_html_x( 'Technical support', 'Premium Tab', 'yith-plugin-fw' ); ?></div> |
| 98 | <div class="landing__advantage"><?php echo esc_html_x( '100% Money-back guarantee', 'Premium Tab', 'yith-plugin-fw' ); ?></div> |
| 99 | </div> |
| 100 | |
| 101 | <a href="<?php echo esc_url( $landing_page_url ); ?>" target="_blank" class="landing__cta"> |
| 102 | <?php echo esc_html_x( 'Get the premium version', 'Premium Tab', 'yith-plugin-fw' ); ?> |
| 103 | </a> |
| 104 | |
| 105 | <div class="landing__testimonials"> |
| 106 | <?php foreach ( $testimonials as $testimonial ) : ?> |
| 107 | <?php |
| 108 | $testimonial = wp_parse_args( $testimonial, $default_testimonial ); |
| 109 | if ( ! $testimonial['name'] || ! $testimonial['message'] ) { |
| 110 | continue; |
| 111 | } |
| 112 | ?> |
| 113 | <div class="testimonial"> |
| 114 | <div class="testimonial__message"> |
| 115 | <svg class="testimonial__message__mark" xmlns="http://www.w3.org/2000/svg" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd" viewBox="0 0 512 379.51"> |
| 116 | <path |
| 117 | d="M299.73 345.54c81.25-22.55 134.13-69.68 147.28-151.7 3.58-22.31-1.42-5.46-16.55 5.86-49.4 36.97-146.53 23.88-160.01-60.55C243.33-10.34 430.24-36.22 485.56 46.34c12.87 19.19 21.39 41.59 24.46 66.19 13.33 106.99-41.5 202.28-137.82 247.04-17.82 8.28-36.6 14.76-56.81 19.52-10.12 2.04-17.47-3.46-20.86-12.78-2.87-7.95-3.85-16.72 5.2-20.77zm-267.78 0c81.25-22.55 134.14-69.68 147.28-151.7 3.58-22.31-1.42-5.46-16.55 5.86-49.4 36.97-146.53 23.88-160-60.55-27.14-149.49 159.78-175.37 215.1-92.81 12.87 19.19 21.39 41.59 24.46 66.19 13.33 106.99-41.5 202.28-137.82 247.04-17.82 8.28-36.59 14.76-56.81 19.52-10.12 2.04-17.47-3.46-20.86-12.78-2.87-7.95-3.85-16.72 5.2-20.77z"/> |
| 118 | </svg> |
| 119 | <?php echo wp_kses_post( wpautop( $testimonial['message'] ) ); ?> |
| 120 | </div> |
| 121 | <div class="testimonial__details"> |
| 122 | <div class="testimonial__name-rating"> |
| 123 | <div class="testimonial__name"> |
| 124 | <strong><?php echo esc_html( $testimonial['name'] ); ?></strong> - <?php echo esc_html_x( 'Verified Customer', 'Premium Tab', 'yith-plugin-fw' ); ?> |
| 125 | </div> |
| 126 | <div class="testimonial__rating"> |
| 127 | <?php for ( $i = 0; $i < 5; $i ++ ) : ?> |
| 128 | <svg fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"> |
| 129 | <path clip-rule="evenodd" fill-rule="evenodd" d="M10.868 2.884c-.321-.772-1.415-.772-1.736 0l-1.83 4.401-4.753.381c-.833.067-1.171 1.107-.536 1.651l3.62 3.102-1.106 4.637c-.194.813.691 1.456 1.405 1.02L10 15.591l4.069 2.485c.713.436 1.598-.207 1.404-1.02l-1.106-4.637 3.62-3.102c.635-.544.297-1.584-.536-1.65l-4.752-.382-1.831-4.401z"></path> |
| 130 | </svg> |
| 131 | <?php endfor; ?> |
| 132 | </div> |
| 133 | </div> |
| 134 | <?php if ( ! ! $testimonial['avatar'] ) : ?> |
| 135 | <img class="testimonial__avatar" src="<?php echo esc_attr( $testimonial['avatar'] ); ?>" alt="<?php echo esc_attr( $testimonial['name'] ); ?>"/> |
| 136 | <?php endif; ?> |
| 137 | </div> |
| 138 | </div> |
| 139 | |
| 140 | <?php endforeach; ?> |
| 141 | </div> |
| 142 | </div> |
| 143 | </div> |
| 144 | </div> |
| 145 |