PluginProbe ʕ •ᴥ•ʔ
Superb Addons: Blocks, Patterns, Pre-built Pages, Sliders, Popups, Free Forms, Animations & More / 4.0.7
Superb Addons: Blocks, Patterns, Pre-built Pages, Sliders, Popups, Free Forms, Animations & More v4.0.7
4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 4.0.0 trunk 1.0.0 2.0.0 2.0.1 2.0.2 2.0.3 3.0 3.0.1 3.0.2 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.2 3.1.3 3.2.0 3.2.1 3.2.2 3.2.4 3.2.5 3.2.7 3.2.8 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.4.5 3.4.6 3.5.0 3.5.1 3.5.2 3.5.3 3.5.4 3.5.6 3.5.7 3.5.8 3.5.9 3.6.0 3.6.1 3.6.2 3.7.0 3.7.1
superb-blocks / src / components / buttons / class-premium-button.php
superb-blocks / src / components / buttons Last commit date
class-button.php 4 days ago class-insert-button.php 4 days ago class-premium-button.php 4 days ago class-preview-button.php 4 days ago
class-premium-button.php
35 lines
1 <?php
2
3 namespace SuperbAddons\Components\Buttons;
4
5 defined('ABSPATH') || exit();
6
7 use SuperbAddons\Admin\Utils\AdminLinkUtil;
8 use SuperbAddons\Components\Buttons\Button;
9 use SuperbAddons\Components\Buttons\ButtonIcon;
10 use SuperbAddons\Components\Buttons\ButtonType;
11
12 class PremiumButton
13 {
14 public function __construct($source, $options = false, $additional_attributes = false)
15 {
16 $attributes = array(
17 'text' => __('Get Premium', "superb-blocks"),
18 'url' => AdminLinkUtil::GetExpLink($source, $options),
19 'class' => 'superb-addons-template-library-template-item-premium-btn superbaddons-element-button-pro superbaddons-element-flex1 superbaddons-item-premium-element',
20 'target' => '_blank',
21 'data' => array('superb-upsell-source' => $source),
22 );
23
24 if (!empty($additional_attributes)) {
25 $attributes = array_merge($attributes, $additional_attributes);
26 }
27
28 new Button(
29 ButtonType::Primary,
30 ButtonIcon::ExternalLink,
31 $attributes
32 );
33 }
34 }
35