public static function menu() { add_submenu_page('formidable', 'Formidable | ' . __('AddOns', 'formidable'), __('AddOns', 'formidable'), 'frm_view_forms', 'formidable-addons', 'FrmAddonsController::list_addons'); $affiliate = FrmAppHelper::get_affiliate(); if (!empty($affiliate)) { add_submenu_page('formidable', 'Formidable | ' . __('Upgrade to Pro', 'formidable'), __('Upgrade to Pro', 'formidable'), 'frm_view_forms', 'formidable-pro-upgrade', 'FrmAddonsController::upgrade_to_pro'); } }
private static function maybe_show_upgrade_bar() { $page = FrmAppHelper::simple_get('page', 'sanitize_title'); if (strpos($page, 'formidable') !== 0) { return; } if (FrmAppHelper::pro_is_installed()) { return; } $affiliate = FrmAppHelper::get_affiliate(); if (!empty($affiliate)) { ?> <div class="update-nag frm-update-to-pro"> Looking for more options to get professional results? <span>Take your forms to the next level.</span> <a href="<?php echo esc_url(FrmAppHelper::make_affiliate_url('https://formidablepro.com')); ?> " class="button">Upgrade to Pro</a> </div> <?php } }
private function opening_line() { $opening = __('You’ve just installed a new form builder plugin!', 'formidable'); $affiliate = FrmAppHelper::get_affiliate(); if ($affiliate == 'mojo') { $opening = 'Your Forms plugin has been installed by MOJO Marketplace for your convenience.'; } return $opening; }
private static function maybe_show_upgrade_bar() { $page = FrmAppHelper::simple_get('page', 'sanitize_title'); if (strpos($page, 'formidable') !== 0) { return; } if (FrmAppHelper::pro_is_installed()) { return; } $affiliate = FrmAppHelper::get_affiliate(); if (!empty($affiliate)) { $tip = FrmTipsHelper::get_banner_tip(); ?> <div class="update-nag frm-update-to-pro"> <?php echo FrmAppHelper::kses($tip['tip']); ?> <span><?php echo FrmAppHelper::kses($tip['call']); ?> </span> <a href="<?php echo esc_url(FrmAppHelper::make_affiliate_url('https://formidablepro.com?banner=1&tip=' . absint($tip['num']))); ?> " class="button">Upgrade to Pro</a> </div> <?php } }