Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion classes/helpers/FrmAppHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -1367,10 +1367,16 @@ public static function print_admin_banner( $should_show_lite_upgrade ) {
?>
<div class="frm-upgrade-bar">
<?php
$upgrade_link = self::admin_upgrade_link(
array(
'medium' => 'settings-license',
'content' => 'lite-banner',
)
);
printf(
/* translators: %1$s: Start link HTML, %2$s: End link HTML */
esc_html__( 'You\'re using Formidable Forms Lite. To unlock more features consider %1$supgrading to PRO%2$s.', 'formidable' ),
'<a href="' . esc_url( self::admin_upgrade_link( 'settings-license' ) ) . '">',
'<a href="' . esc_url( $upgrade_link ) . '">',
'</a>'
);
?>
Expand Down
9 changes: 8 additions & 1 deletion classes/helpers/FrmDashboardHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,13 @@ class="<?php echo esc_attr( $button_classes . $add_classes ); ?>"
* @return array
*/
public static function get_license_buttons() {
$upgrade_link = FrmAppHelper::admin_upgrade_link(
array(
'medium' => 'settings-license',
'content' => 'dashboard-license-box',
)
);

return array(
array(
'label' => __( 'Connect Account', 'formidable' ),
Expand All @@ -204,7 +211,7 @@ public static function get_license_buttons() {
),
array(
'label' => __( 'Get Formidable PRO', 'formidable' ),
'link' => FrmAppHelper::admin_upgrade_link( 'settings-license' ),
'link' => $upgrade_link,
'classes' => 'frm-button-secondary frm-show-unauthorized',
),
);
Expand Down
9 changes: 8 additions & 1 deletion classes/views/dashboard/templates/pro-features-list.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
if ( ! defined( 'ABSPATH' ) ) {
die( 'You are not allowed to call this page directly.' );
}

$discount_link = FrmAppHelper::admin_upgrade_link(
array(
'medium' => 'dashboard-discount',
'content' => 'dashboard-defy-limits-cta',
)
);
?>
<div class="frm-dashboard-widget frm-card-item frm-px-0 frm-p-0">
<div class="frm-pro-features-list">
Expand All @@ -21,7 +28,7 @@
</li>
<?php endforeach; ?>
</ul>
<a target="_blank" href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'dashboard-discount' ) ); ?>" title="Upgrade" class="frm-button-primary">
<a target="_blank" href="<?php echo esc_url( $discount_link ); ?>" title="Upgrade" class="frm-button-primary">
<?php esc_html_e( 'Upgrade to Pro & Get 50% Off', 'formidable' ); ?>
</a>
</div>
Expand Down
17 changes: 15 additions & 2 deletions classes/views/frm-settings/license_box.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,27 @@
if ( ! defined( 'ABSPATH' ) ) {
die( 'You are not allowed to call this page directly.' );
}

$button_upgrade_link = FrmAppHelper::admin_upgrade_link(
array(
'medium' => 'settings-license',
'content' => 'global-settings-license-box-get-formidable-button',
)
);
$unlock_more_upgrade_link = FrmAppHelper::admin_upgrade_link(
array(
'medium' => 'settings-license',
'content' => 'global-settings-license-box-unlock-more',
)
);
?>
<div id="frm_license_top" class="frm_unauthorized_box">
<p id="frm-connect-btns" class="frm-show-unauthorized">
<a href="<?php echo esc_url( FrmAddonsController::connect_link() ); ?>" class="button-primary frm-button-primary frm-button-sm">
<?php esc_html_e( 'Connect an Account', 'formidable' ); ?>
</a>
<?php esc_html_e( 'or', 'formidable' ); ?>
<a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'settings-license' ) ); ?>" target="_blank" class="button-secondary frm-button-secondary frm-button-sm">
<a href="<?php echo esc_url( $button_upgrade_link ); ?>" target="_blank" class="button-secondary frm-button-secondary frm-button-sm">
<?php esc_html_e( 'Get Formidable Now', 'formidable' ); ?>
</a>
</p>
Expand All @@ -23,7 +36,7 @@
printf(
/* translators: %1$s: Start link HTML, %2$s: End link HTML */
esc_html__( 'To unlock more features consider %1$supgrading to PRO%2$s.', 'formidable' ),
'<a href="' . esc_url( FrmAppHelper::admin_upgrade_link( 'settings-license' ) ) . '">',
'<a href="' . esc_url( $unlock_more_upgrade_link ) . '">',
'</a>'
);
?>
Expand Down