| @@ -1,33 +1,71 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | if ( ! defined( 'ABSPATH' ) ) { |
| 3 | 3 | die( 'You are not allowed to call this page directly.' ); |
| 4 | 4 | } |
| 5 | -$is_welcome = FrmAppHelper::is_admin_page( 'formidable-welcome' ); | |
| 5 | + | |
| 6 | +$button_upgrade_text = FrmSalesApi::get_best_sale_value( 'global_settings_license_cta_text' ); | |
| 7 | + | |
| 8 | +if ( ! $button_upgrade_text ) { | |
| 9 | + $button_upgrade_text = __( 'Get Formidable Now', 'formidable' ); | |
| 10 | +} | |
| 11 | + | |
| 12 | +$button_upgrade_link = FrmSalesApi::get_best_sale_value( 'global_settings_license_cta_link' ); | |
| 13 | +$utm = array( | |
| 14 | + 'campaign' => 'settings-license', | |
| 15 | + 'content' => 'global-settings-license-box-get-formidable-button', | |
| 16 | +); | |
| 17 | + | |
| 18 | +if ( $button_upgrade_link ) { | |
| 19 | + $button_upgrade_link = FrmAppHelper::maybe_add_missing_utm( $button_upgrade_link, $utm ); | |
| 20 | +} else { | |
| 21 | + $button_upgrade_link = FrmAppHelper::admin_upgrade_link( $utm ); | |
| 22 | +} | |
| 23 | + | |
| 24 | +$unlock_more_upgrade_text = FrmSalesApi::get_best_sale_value( 'global_settings_unlock_more_cta_text' ); | |
| 25 | + | |
| 26 | +if ( ! $unlock_more_upgrade_text ) { | |
| 27 | + $unlock_more_upgrade_text = __( 'upgrading to PRO', 'formidable' ); | |
| 28 | +} | |
| 29 | + | |
| 30 | +$unlock_more_upgrade_link = FrmSalesApi::get_best_sale_value( 'global_settings_unlock_more_cta_link' ); | |
| 31 | +$utm = array( | |
| 32 | + 'campaign' => 'settings-license', | |
| 33 | + 'content' => 'global-settings-license-box-unlock-more', | |
| 34 | +); | |
| 35 | + | |
| 36 | +if ( $unlock_more_upgrade_link ) { | |
| 37 | + $unlock_more_upgrade_link = FrmAppHelper::maybe_add_missing_utm( $unlock_more_upgrade_link, $utm ); | |
| 38 | +} else { | |
| 39 | + $unlock_more_upgrade_link = FrmAppHelper::admin_upgrade_link( $utm ); | |
| 40 | +} | |
| 6 | 41 | ?> |
| 7 | 42 | <div id="frm_license_top" class="frm_unauthorized_box"> |
| 8 | -<p id="frm-connect-btns" class="frm-show-unauthorized"> | |
| 9 | - <a href="<?php echo esc_url( FrmAddonsController::connect_link() ); ?>" class="button-primary frm-button-primary<?php echo esc_attr( $is_welcome ? '' : ' frm-button-sm' ); ?>"> | |
| 10 | - <?php esc_html_e( 'Connect an Account', 'formidable' ); ?> | |
| 11 | - </a> | |
| 12 | - or | |
| 13 | - <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'settings-license' ) ); ?>" target="_blank" class="button-secondary frm-button-secondary<?php echo esc_attr( $is_welcome ? '' : ' frm-button-sm' ); ?>"> | |
| 14 | - <?php esc_html_e( 'Get Formidable Now', 'formidable' ); ?> | |
| 15 | - </a> | |
| 16 | -</p> | |
| 43 | + <p id="frm-connect-btns" class="frm-show-unauthorized"> | |
| 44 | + <a href="<?php echo esc_url( FrmAddonsController::connect_link() ); ?>" class="button-primary frm-button-primary frm-button-sm" target="_blank" rel="noopener"> | |
| 45 | + <?php esc_html_e( 'Connect an Account', 'formidable' ); ?> | |
| 46 | + </a> | |
| 47 | + <?php esc_html_e( 'or', 'formidable' ); ?> | |
| 48 | + <a href="<?php echo esc_url( $button_upgrade_link ); ?>" target="_blank" class="button-secondary frm-button-secondary frm-button-sm"> | |
| 49 | + <?php echo esc_html( $button_upgrade_text ); ?> | |
| 50 | + </a> | |
| 51 | + </p> | |
| 17 | 52 | |
| 18 | -<div id="frm-using-lite" class="frm-show-unauthorized"> | |
| 19 | -<p>You're using Formidable Forms Lite - no license needed. Enjoy! 🙂</p> | |
| 20 | -<p> | |
| 21 | - <?php | |
| 22 | - printf( | |
| 23 | - /* translators: %1$s: Start link HTML, %2$s: End link HTML */ | |
| 24 | - esc_html__( 'To unlock more features consider %1$supgrading to PRO%2$s.', 'formidable' ), | |
| 25 | - '<a href="' . esc_url( FrmAppHelper::admin_upgrade_link( 'settings-license' ) ) . '">', | |
| 26 | - '</a>' | |
| 27 | - ); | |
| 28 | - ?> | |
| 29 | -</p> | |
| 30 | -</div> | |
| 53 | + <div id="frm-using-lite" class="frm-show-unauthorized"> | |
| 54 | + <p> | |
| 55 | + <?php echo esc_html( FrmAppHelper::copy_for_lite_license() ); ?> | |
| 56 | + </p> | |
| 57 | + <p> | |
| 58 | + <?php | |
| 59 | + printf( | |
| 60 | + /* translators: %1$s: Start link HTML, %2$s: CTA Text (Default is "upgrading to PRO"), %3$s: End link HTML */ | |
| 61 | + esc_html__( 'To unlock more features consider %1$s%2$s%3$s.', 'formidable' ), | |
| 62 | + '<a href="' . esc_url( $unlock_more_upgrade_link ) . '" target="_blank" rel="noopener">', | |
| 63 | + esc_html( $unlock_more_upgrade_text ), | |
| 64 | + '</a>' | |
| 65 | + ); | |
| 66 | + ?> | |
| 67 | + </p> | |
| 68 | + </div> | |
| 31 | 69 | </div> |
| 32 | 70 | |
| 33 | 71 | <div class="frm_pro_license_msg frm_hidden"></div> |