| 1 |
<?php |
| 2 |
|
| 3 |
|
| 4 |
namespace Jet_Form_Builder\Admin\Pages\Settings; |
| 5 |
|
| 6 |
use JFB_Components\Admin\Buttons\Base_Vui_Button as Button; |
| 7 |
use JFB_Components\Admin\Notices\Base_Notice; |
| 8 |
use Jet_Form_Builder\Classes\Http\Utm_Url; |
| 9 |
|
| 10 |
// If this file is called directly, abort. |
| 11 |
if ( ! defined( 'WPINC' ) ) { |
| 12 |
die; |
| 13 |
} |
| 14 |
|
| 15 |
class Pro_Notice extends Base_Notice { |
| 16 |
|
| 17 |
public function get_id(): string { |
| 18 |
return 'see-pro-addons'; |
| 19 |
} |
| 20 |
|
| 21 |
public function get_message(): string { |
| 22 |
return __( |
| 23 |
'Expand your forms functionality with automate, calculate, integrations of payments gateways, |
| 24 |
CRMs and email marketing. Try premium addons for JetFormBuilder plugin.', |
| 25 |
'jet-form-builder' |
| 26 |
); |
| 27 |
} |
| 28 |
|
| 29 |
public function get_buttons(): array { |
| 30 |
$utm = new Utm_Url( 'plugin' ); |
| 31 |
$utm->set_medium( 'notification-bar' ); |
| 32 |
$utm->set_campaign( 'check-pro-addons-button' ); |
| 33 |
$utm->set_content( $utm->get_license_and_theme() ); |
| 34 |
|
| 35 |
return array( |
| 36 |
( new Button( 'check' ) ) |
| 37 |
->set_label( __( 'Check Pro Addons', 'jet-form-builder' ) ) |
| 38 |
->set_size( Button::SIZE_MINI ) |
| 39 |
->set_url( $utm->add_query( JET_FORM_BUILDER_SITE . '/addons/' ) ), |
| 40 |
( new Button( 'thanks' ) ) |
| 41 |
->set_label( __( 'No, thanks', 'jet-form-builder' ) ) |
| 42 |
->set_size( Button::SIZE_MINI ) |
| 43 |
->set_style( Button::STYLE_ACCENT_BORDER ), |
| 44 |
); |
| 45 |
} |
| 46 |
} |
| 47 |
|