| 1 |
<?php |
| 2 |
/** |
| 3 |
* @since 6.8 |
| 4 |
* |
| 5 |
* @var array $features The list of pro features. |
| 6 |
* |
| 7 |
* @package Formidable |
| 8 |
*/ |
| 9 |
|
| 10 |
if ( ! defined( 'ABSPATH' ) ) { |
| 11 |
die( 'You are not allowed to call this page directly.' ); |
| 12 |
} |
| 13 |
|
| 14 |
$best_discount = FrmSalesApi::get_best_sale_value( 'discount_percent' ); |
| 15 |
$use_discount = $best_discount > 50 ? $best_discount : 50; |
| 16 |
$discount_text = sprintf( |
| 17 |
// translators: %s is the discount percentage (ie 50%). |
| 18 |
__( 'Upgrade to Pro & Get %1$s Off', 'formidable' ), |
| 19 |
$use_discount . '%' |
| 20 |
); |
| 21 |
|
| 22 |
$discount_link = FrmSalesApi::get_best_sale_value( 'global_settings_upgrade_cta_link' ); |
| 23 |
$utm = array( |
| 24 |
'campaign' => 'dashboard-discount', |
| 25 |
'content' => 'dashboard-defy-limits-cta', |
| 26 |
); |
| 27 |
|
| 28 |
if ( $discount_link ) { |
| 29 |
$discount_link = FrmAppHelper::maybe_add_missing_utm( $discount_link, $utm ); |
| 30 |
} else { |
| 31 |
$discount_link = FrmAppHelper::admin_upgrade_link( $utm ); |
| 32 |
} |
| 33 |
?> |
| 34 |
<div class="frm-dashboard-widget frm-card-item frm-px-0 frm-p-0"> |
| 35 |
<div class="frm-pro-features-list"> |
| 36 |
<div class="frm-pro-features-list-left"> |
| 37 |
<h2><?php esc_html_e( 'Unlock all the Powerful Features to Defy the Limits', 'formidable' ); ?></h2> |
| 38 |
<ul class="frm_two_col frm-green-icons"> |
| 39 |
<?php foreach ( $features as $feature ) : ?> |
| 40 |
<li> |
| 41 |
<?php FrmAppHelper::icon_by_class( 'frmfont frm_checkmark_icon' ); ?> |
| 42 |
<?php echo esc_html( $feature ); ?> |
| 43 |
</li> |
| 44 |
<?php endforeach; ?> |
| 45 |
</ul> |
| 46 |
<a target="_blank" href="<?php echo esc_url( $discount_link ); ?>" title="Upgrade" class="frm-button-primary frm-gradient"> |
| 47 |
<?php echo esc_html( $discount_text ); ?> |
| 48 |
</a> |
| 49 |
</div> |
| 50 |
|
| 51 |
<div class="frm-pro-features-list-right"> |
| 52 |
<div class="frm-testimonial-wrapper"> |
| 53 |
<div class="frm-testimonial"> |
| 54 |
<div class="frm-testimonial__content">Amazing plugin, amazing support. We've been using FF since 2016. The best form plugin on WP. Its powerful and versatile with an amazing support!</div> |
| 55 |
<div class="frm-testimonial__author">Emmanuel Khoury</div> |
| 56 |
<div class="frm-testimonial__rating"> |
| 57 |
<?php FrmAddonsHelper::show_five_star_rating( '#FFD966' ); ?> |
| 58 |
</div> |
| 59 |
<div class="frm-testimonial__guarantee-icon"> |
| 60 |
<?php FrmAddonsHelper::guarantee_icon(); ?> |
| 61 |
</div> |
| 62 |
</div> |
| 63 |
</div> |
| 64 |
</div> |
| 65 |
</div> |
| 66 |
</div> |
| 67 |
|