helpful-links-box.php
2 years ago
pro-notice.php
2 years ago
settings-page.php
2 years ago
useful-banner-box.php
2 years ago
useful-banner-box.php
52 lines
| 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\Vui_Boxes\Base_Vui_Banner_Box; |
| 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 Useful_Banner_Box extends Base_Vui_Banner_Box { |
| 16 | |
| 17 | public function get_label(): string { |
| 18 | return __( 'Useful', 'jet-form-builder' ); |
| 19 | } |
| 20 | |
| 21 | public function get_title(): string { |
| 22 | return __( 'Try more options with PRO addons from JetFormBuilder.', 'jet-form-builder' ); |
| 23 | } |
| 24 | |
| 25 | public function get_content(): string { |
| 26 | return __( '16 Addons Available', 'jet-form-builder' ); |
| 27 | } |
| 28 | |
| 29 | public function get_slug(): string { |
| 30 | return 'useful'; |
| 31 | } |
| 32 | |
| 33 | public function get_classes(): array { |
| 34 | return array( 'light-1-preset' ); |
| 35 | } |
| 36 | |
| 37 | public function get_buttons(): array { |
| 38 | $utm = new Utm_Url( 'plugin' ); |
| 39 | $utm->set_medium( 'settings' ); |
| 40 | $utm->set_campaign( 'try-more-banner/discover-addons-button' ); |
| 41 | $utm->set_content( $utm->get_license_and_theme() ); |
| 42 | |
| 43 | return array( |
| 44 | ( new Button( 'useful-button' ) ) |
| 45 | ->set_label( __( 'Discover addons', 'jet-form-builder' ) ) |
| 46 | ->set_size( Button::SIZE_MINI ) |
| 47 | ->set_style( Button::STYLE_ACCENT_BORDER ) |
| 48 | ->set_url( $utm->add_query( JET_FORM_BUILDER_SITE . '/addons' ) ), |
| 49 | ); |
| 50 | } |
| 51 | } |
| 52 |