diff --git a/classes/controllers/FrmAddonsController.php b/classes/controllers/FrmAddonsController.php index 513df262d1..b0d90d1b37 100644 --- a/classes/controllers/FrmAddonsController.php +++ b/classes/controllers/FrmAddonsController.php @@ -1411,6 +1411,7 @@ public static function show_conditional_action_button( $atts ) { public static function addon_upgrade_link( $addon, $upgrade_link ) { $atts = is_array( $upgrade_link ) ? $upgrade_link : array(); $upgrade_link = is_array( $upgrade_link ) ? $upgrade_link['link'] : $upgrade_link; + $text = ! empty( $atts['text'] ) ? $atts['text'] : __( 'Upgrade Now', 'formidable' ); if ( $addon ) { $upgrade_link .= '&utm_content=' . $addon['slug']; @@ -1427,7 +1428,7 @@ public static function addon_upgrade_link( $addon, $upgrade_link ) { } ?> - + FrmEntry::get_entries_count(), ); - $dashboard_view = new FrmDashboardHelper( + return new FrmDashboardHelper( array( 'counters' => array( 'counters' => self::view_args_counters( $latest_available_form, $counters_value ), @@ -111,6 +113,15 @@ public static function route() { 'video' => array( 'id' => self::get_youtube_embed_video( $counters_value['entries'] ) ), ) ); + } + + /** + * Init dashboard page. + * + * @return void + */ + public static function route() { + $dashboard_view = self::get_dashboard_helper(); $should_display_videos = is_callable( 'FrmProDashboardHelper::should_display_videos' ) ? FrmProDashboardHelper::should_display_videos() : true; diff --git a/classes/controllers/FrmHooksController.php b/classes/controllers/FrmHooksController.php index 9e8a4a6994..ec99052bff 100644 --- a/classes/controllers/FrmHooksController.php +++ b/classes/controllers/FrmHooksController.php @@ -162,7 +162,7 @@ public static function load_admin_hooks() { // Settings Controller. add_action( 'admin_menu', 'FrmSettingsController::menu', 45 ); add_action( 'frm_before_settings', 'FrmSettingsController::license_box' ); - add_action( 'frm_after_settings', 'FrmSettingsController::settings_cta' ); + add_action( 'frm_after_settings_tabs', 'FrmSettingsController::settings_cta' ); // Styles Controller. add_action( 'admin_menu', 'FrmStylesController::menu', 14 ); diff --git a/classes/controllers/FrmSettingsController.php b/classes/controllers/FrmSettingsController.php index 8c74af2932..ffaf29e0e1 100644 --- a/classes/controllers/FrmSettingsController.php +++ b/classes/controllers/FrmSettingsController.php @@ -330,29 +330,10 @@ public static function route( $stop_load = false ) { * @since 3.04.02 */ public static function settings_cta( $view ) { - if ( get_option( 'frm_lite_settings_upgrade', false ) ) { return; } - $features = array( - __( 'Extra form features like file uploads, pagination, etc', 'formidable' ), - __( 'Repeaters & cascading fields for advanced forms', 'formidable' ), - __( 'Flexibly view, search, edit, and delete entries anywhere', 'formidable' ), - __( 'Display entries with virtually limitless Formidable views', 'formidable' ), - __( 'Create surveys & polls', 'formidable' ), - __( 'WordPress user registration and login forms', 'formidable' ), - __( 'Create Stripe, PayPal or Authorize.net payment forms', 'formidable' ), - __( 'Powerful conditional logic for smart forms', 'formidable' ), - __( 'Integrations with 1000+ marketing & payment services', 'formidable' ), - __( 'Collect digital signatures', 'formidable' ), - __( 'Accept user-submitted content with Post submissions', 'formidable' ), - __( 'Email routing', 'formidable' ), - __( 'Create calculator forms', 'formidable' ), - __( 'Save draft entries and return later', 'formidable' ), - __( 'Analyze form data with graphs & stats', 'formidable' ), - ); - include FrmAppHelper::plugin_path() . '/classes/views/frm-settings/settings_cta.php'; } diff --git a/classes/helpers/FrmAddonsHelper.php b/classes/helpers/FrmAddonsHelper.php index 6871f3b941..6aaf5c38c5 100644 --- a/classes/helpers/FrmAddonsHelper.php +++ b/classes/helpers/FrmAddonsHelper.php @@ -53,6 +53,8 @@ public static function show_upgrade_renew_cta() { private static function show_expired_cta() { FrmTipsHelper::show_admin_cta( array( + 'class' => 'frm-gradient', + 'icon' => 'frmfont frm_speaker_icon', 'title' => esc_html__( 'Unlock Add-on library', 'formidable' ), 'description' => esc_html__( 'Renew your subscription today and access our library of add-ons to supercharge your forms.', 'formidable' ), 'link_text' => esc_html__( 'Renew Now', 'formidable' ), @@ -71,6 +73,8 @@ private static function show_expired_cta() { private static function show_lite_cta() { FrmTipsHelper::show_admin_cta( array( + 'class' => 'frm-gradient', + 'icon' => 'frmfont frm_speaker_icon', 'title' => esc_html__( 'Unlock Add-on library', 'formidable' ), 'description' => esc_html__( 'Upgrade to Pro and access our library of add-ons to supercharge your forms.', 'formidable' ), 'link_text' => esc_html__( 'Upgrade to PRO', 'formidable' ), @@ -261,4 +265,56 @@ private static function set_plan_required( $addon ) { public static function get_plan() { return self::$plan_required; } + + /** + * Shows five star rating, used on Views page if only Lite plugins are installed. + * + * @since x.x + * + * @param string $color Star color. + * @return void + */ + public static function show_five_star_rating( $color = 'black' ) { + $icon = file_get_contents( FrmAppHelper::plugin_path() . '/images/star.svg' ); + ?> + + + + + + 'frm-gradient', + 'icon' => 'frmfont frm_speaker_icon', 'title' => sprintf( /* translators: %1$s: Open span tag, %2$s: Close span tag */ - esc_html__( 'Get Super Powers with %1$s%2$s More Pre-built Forms', 'formidable' ) . ' 🦸', + esc_html__( 'Upgrade to get all %1$s%2$s templates', 'formidable' ), '', '' ), - 'description' => esc_html__( 'Unleash the potential of hundreds of additional form templates and save precious time. Upgrade today for unparalleled form-building capabilities.', 'formidable' ), - 'link_text' => esc_html__( 'Upgrade to PRO', 'formidable' ), + 'description' => esc_html__( 'Upgrade to PRO to get access to all of our templates and unlock the full potential of your forms.', 'formidable' ), + 'link_text' => esc_html__( 'Get More Templates', 'formidable' ), 'link_url' => $args['upgrade_link'], 'id' => 'frm-upgrade-banner', ) diff --git a/classes/helpers/FrmTipsHelper.php b/classes/helpers/FrmTipsHelper.php index 6f2ed7f28a..af311cd662 100644 --- a/classes/helpers/FrmTipsHelper.php +++ b/classes/helpers/FrmTipsHelper.php @@ -57,18 +57,18 @@ public static function show_tip( $tip, $html = '' ) { $link = empty( $tip['link'] ) ? $tip['page'] : FrmAppHelper::admin_upgrade_link( $tip['link'], $tip['page'] ); ?> - - 'true' ) ); ?> + class="frm_pro_tip frm-gradient"> + - class="frm-tip-cta"> + - - + +
diff --git a/classes/views/frm-settings/form.php b/classes/views/frm-settings/form.php index d5937bd393..4caf06c533 100644 --- a/classes/views/frm-settings/form.php +++ b/classes/views/frm-settings/form.php @@ -24,42 +24,44 @@- -
-- - - -
-- Bonus: Formidable Forms Lite users get 50% off regular price, automatically applied at checkout. -
-+
'views-info', 'plan' => 'view', - 'class' => 'frm-mb-md frm-button-primary', + 'class' => 'frm-mb-md frm-button-primary frm-gradient', + 'text' => __( 'Get Formidable Views', 'formidable' ), ); FrmAddonsController::conditional_action_button( 'views', $upgrade_link_args ); ?> -