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 / slots / class-premium-option-wrapper.php
superb-blocks / src / components / slots Last commit date
class-css-blocks-base-slot.php 1 week ago class-css-blocks-export-selected-slot.php 1 week ago class-css-blocks-export-single-slot.php 1 week ago class-css-blocks-target-slot.php 1 week ago class-premium-option-wrapper.php 1 week ago class-premium-slot.php 1 week ago class-slot-render-utility.php 1 week ago
class-premium-option-wrapper.php
34 lines
1 <?php
2
3 namespace SuperbAddons\Components\Slots;
4
5 use SuperbAddons\Admin\Utils\AdminLinkUtil;
6
7 defined('ABSPATH') || exit();
8
9 class PremiumOptionWrapper
10 {
11 public function __construct($contentCallback, $classes = array(), $source = false, $link_options = false, $allow_pointer_events = false)
12 {
13 $this->Render($contentCallback, $classes, $source, $link_options, $allow_pointer_events);
14 }
15
16 private function Render($contentCallback, $classes, $source, $link_options, $allow_pointer_events)
17 {
18 $passthrough_class = $allow_pointer_events ? ' superbaddons-premium-only-option-wrapper-passthrough' : '';
19 ?>
20 <div class="superbaddons-element-inlineflex-center superbaddons-premium-only-option-wrapper<?php echo esc_attr($passthrough_class); ?> <?php echo esc_attr(join(" ", $classes)); ?>" <?php echo $source ? ' data-superb-upsell-source="' . esc_attr($source) . '"' : ''; ?> title="<?php echo esc_attr__("Premium Feature", "superb-blocks"); ?>">
21 <a href="<?php echo esc_url(AdminLinkUtil::GetExpLink($source, $link_options)); ?>" target="_blank" class="superbaddons-premium-only-option" aria-label="<?php echo esc_attr__("Premium Feature", "superb-blocks"); ?>">
22 <div class="superbaddons-premium-only-option-icon">
23 <img width="16" src="<?php echo esc_url(SUPERBADDONS_ASSETS_PATH . '/img/color-crown.svg'); ?>" />
24 <span><?php echo esc_html__("Premium", "superb-blocks"); ?></span>
25 </div>
26 </a>
27 <div class="superbaddons-premium-only-content" style="<?php echo $allow_pointer_events ? '' : 'pointer-events: none;'; ?> opacity:0.5;">
28 <?php SlotRenderUtility::Render($contentCallback); ?>
29 </div>
30 </div>
31 <?php
32 }
33 }
34