PluginProbe ʕ •ᴥ•ʔ
Superb Addons: Blocks, Patterns, Pre-built Pages, Sliders, Popups, Free Forms, Animations & More / 3.5.6
Superb Addons: Blocks, Patterns, Pre-built Pages, Sliders, Popups, Free Forms, Animations & More v3.5.6
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 / admin / class-link-box.php
superb-blocks / src / components / admin Last commit date
class-content-box-large.php 1 year ago class-enhancement-settings-component.php 1 year ago class-feature-request-box.php 1 year ago class-input-checkbox.php 1 year ago class-link-box.php 1 year ago class-modal-editor-previews.php 1 year ago class-modal-feedback.php 1 year ago class-modal.php 1 year ago class-navigation.php 1 year ago class-newsletter-form.php 1 year ago class-outdated-browser-warning.php 1 year ago class-premium-box-large.php 1 year ago class-premium-box.php 1 year ago class-premium-feature-list.php 1 year ago class-review-box.php 1 year ago class-support-box.php 1 year ago class-support-link-boxes.php 1 year ago
class-link-box.php
55 lines
1 <?php
2
3 namespace SuperbAddons\Components\Admin;
4
5 defined('ABSPATH') || exit();
6
7 class LinkBox
8 {
9 private $id = false;
10 private $title = false;
11 private $description = false;
12 private $link = false;
13 private $cta = false;
14 private $icon = false;
15 private $pro = false;
16 private $classes = false;
17 private $same_window = false;
18
19 public function __construct($options)
20 {
21 $this->id = $options['id'] ?? false;
22 $this->title = $options['title'] ?? false;
23 $this->description = $options['description'] ?? false;
24 $this->link = $options['link'] ?? false;
25 $this->cta = $options['cta'] ?? false;
26 $this->icon = $options['icon'] ?? false;
27 $this->pro = $options['pro'] ?? false;
28 $this->classes = $options['classes'] ?? false;
29 $this->same_window = $options['same_window'] ?? false;
30
31 $this->Render();
32 }
33
34 private function Render()
35 {
36 ?>
37 <div class="superbaddons-admindashboard-content-box <?php echo $this->classes ? esc_attr($this->classes) : ''; ?>" <?php if ($this->id) : ?>id="<?php echo esc_attr($this->id); ?>" <?php endif; ?>>
38 <div class="superbaddons-admindashboard-link-box-inner">
39 <?php if ($this->pro) : ?>
40 <span class="superbaddons-element-pro-badge"><?php echo esc_html__("Premium", "superb-blocks"); ?></span>
41 <?php endif; ?>
42 <img class="superbaddons-admindashboard-content-icon superbaddons-element-mb1" src="<?php echo esc_url(SUPERBADDONS_ASSETS_PATH . '/img/' . $this->icon); ?>" />
43 <h4 class="superbaddons-element-text-md superbaddons-element-text-800 superbaddons-element-text-dark superbaddons-element-m0"><?php echo esc_html($this->title); ?> </h4>
44 <p class="superbaddons-element-text-xxs superbaddons-element-text-gray">
45 <?php echo esc_html($this->description); ?>
46 </p>
47 <?php if ($this->cta && $this->link) : ?>
48 <a <?php echo !$this->same_window ? 'target="_blank"' : ''; ?> class="<?php echo $this->pro ? 'superbaddons-element-button-pro' : 'superbaddons-element-colorlink'; ?> superbaddons-element-text-xs" href="<?php echo esc_url($this->link); ?>"><?php echo esc_html($this->cta); ?></a>
49 <?php endif; ?>
50 </div>
51 </div>
52 <?php
53 }
54 }
55