class-content-box-large.php
1 year ago
class-enhancement-settings-component.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-input-checkbox.php
46 lines
| 1 | <?php |
| 2 | |
| 3 | namespace SuperbAddons\Components\Admin; |
| 4 | |
| 5 | defined('ABSPATH') || exit(); |
| 6 | |
| 7 | class InputCheckbox |
| 8 | { |
| 9 | private $Id; |
| 10 | private $Action; |
| 11 | private $Title; |
| 12 | private $Description; |
| 13 | private $Checked; |
| 14 | private $Icon; |
| 15 | |
| 16 | public function __construct($id, $action, $title, $description = false, $checked = false, $icon = false) |
| 17 | { |
| 18 | $this->Id = $id; |
| 19 | $this->Action = $action; |
| 20 | $this->Title = $title; |
| 21 | $this->Description = $description; |
| 22 | $this->Checked = $checked; |
| 23 | $this->Icon = $icon; |
| 24 | $this->Render(); |
| 25 | } |
| 26 | |
| 27 | private function Render() |
| 28 | { |
| 29 | ?> |
| 30 | <div class="superb-addons-checkbox-input-wrapper"> |
| 31 | <label class="superbaddons-element-text-xs superbaddons-element-text-gray superbaddons-element-inlineflex-center superbaddons-element-relative"> |
| 32 | <input id="<?= esc_attr($this->Id); ?>" name="<?= esc_attr($this->Id); ?>" class="superbaddons-inputcheckbox-input" data-action="<?= esc_attr($this->Action); ?>" type="checkbox" <?= $this->Checked ? 'checked="checked"' : '' ?>> |
| 33 | <span class="superb-addons-checkbox-checkmark"><img class="superbaddons-admindashboard-content-icon" src="<?= esc_url(SUPERBADDONS_ASSETS_PATH . '/img/checkmark.svg'); ?>" /></span> |
| 34 | <span><?= esc_html($this->Title); ?></span> |
| 35 | <?php if ($this->Icon) : ?> |
| 36 | <img class="superbaddons-admindashboard-checkbox-icon" src="<?= esc_url(SUPERBADDONS_ASSETS_PATH . $this->Icon); ?>" /> |
| 37 | <?php endif; ?> |
| 38 | </label> |
| 39 | <?php if ($this->Description) : ?> |
| 40 | <p class="superbaddons-element-text-xxs superbaddons-element-text-gray"><?= esc_html($this->Description); ?></p> |
| 41 | <?php endif; ?> |
| 42 | </div> |
| 43 | <?php |
| 44 | } |
| 45 | } |
| 46 |