class-content-box-large.php
2 years ago
class-enhancement-settings-component.php
2 years ago
class-input-checkbox.php
2 years ago
class-link-box.php
2 years ago
class-modal-feedback.php
2 years ago
class-modal.php
2 years ago
class-navigation.php
2 years ago
class-premium-box-large.php
2 years ago
class-premium-box.php
2 years ago
class-premium-feature-list.php
2 years ago
class-review-box.php
2 years ago
class-support-box.php
2 years ago
class-support-link-boxes.php
2 years ago
class-content-box-large.php
54 lines
| 1 | <?php |
| 2 | |
| 3 | namespace SuperbAddons\Components\Admin; |
| 4 | |
| 5 | defined('ABSPATH') || exit(); |
| 6 | |
| 7 | class ContentBoxLarge |
| 8 | { |
| 9 | private $title = false; |
| 10 | private $description = false; |
| 11 | private $link = false; |
| 12 | private $cta = false; |
| 13 | private $image = false; |
| 14 | private $icon = false; |
| 15 | private $class = false; |
| 16 | |
| 17 | private $connected_bottom = false; |
| 18 | |
| 19 | public function __construct($options) |
| 20 | { |
| 21 | $this->title = $options['title'] ?? false; |
| 22 | $this->description = $options['description'] ?? false; |
| 23 | $this->link = $options['link'] ?? false; |
| 24 | $this->cta = $options['cta'] ?? false; |
| 25 | $this->image = $options['image'] ?? false; |
| 26 | $this->icon = $options['icon'] ?? false; |
| 27 | $this->class = $options['class'] ?? false; |
| 28 | |
| 29 | $this->connected_bottom = $options['connected_bottom'] ?? false; |
| 30 | |
| 31 | $this->Render(); |
| 32 | } |
| 33 | |
| 34 | private function Render() |
| 35 | { |
| 36 | ?> |
| 37 | <div class="superbaddons-admindashboard-content-box-large <?= esc_attr($this->class); ?> <?= $this->connected_bottom ? 'superbaddons-admindashboard-content-box-large-connected-bottom' : ''; ?>" <?= $this->image ? 'style="background-image:url(' . esc_url(SUPERBADDONS_ASSETS_PATH . '/img/' . $this->image) . ');"' : ''; ?>> |
| 38 | <div class="superbaddons-admindashboard-content-box-large-inner"> |
| 39 | <?php if ($this->icon) : ?> |
| 40 | <img class="superbaddons-admindashboard-content-icon" src="<?= esc_url(SUPERBADDONS_ASSETS_PATH . '/img/' . $this->icon); ?>" /> |
| 41 | <?php endif; ?> |
| 42 | <h3 class="superbaddons-element-text-md superbaddons-element-text-800 superbaddons-element-text-dark"><?= esc_html($this->title); ?></h3> |
| 43 | <p class="superbaddons-element-text-xs superbaddons-element-text-gray"> |
| 44 | <?= esc_html($this->description); ?> |
| 45 | </p> |
| 46 | <?php if ($this->link && $this->cta) : ?> |
| 47 | <a class="superbaddons-element-button" href="<?= esc_url($this->link); ?>"><?= esc_html($this->cta); ?></a> |
| 48 | <?php endif; ?> |
| 49 | </div> |
| 50 | </div> |
| 51 | <?php |
| 52 | } |
| 53 | } |
| 54 |