本文整理匯總了PHP中FrmAppHelper::get_affiliate方法的典型用法代碼示例。如果您正苦於以下問題:PHP FrmAppHelper::get_affiliate方法的具體用法?PHP FrmAppHelper::get_affiliate怎麽用?PHP FrmAppHelper::get_affiliate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FrmAppHelper
的用法示例。
在下文中一共展示了FrmAppHelper::get_affiliate方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: menu
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');
}
}
示例2: maybe_show_upgrade_bar
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
}
}
示例3: opening_line
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;
}
示例4: maybe_show_upgrade_bar
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
}
}