PluginProbe ʕ •ᴥ•ʔ
Superb Addons: Blocks, Patterns, Pre-built Pages, Sliders, Popups, Free Forms, Animations & More / 3.3.1
Superb Addons: Blocks, Patterns, Pre-built Pages, Sliders, Popups, Free Forms, Animations & More v3.3.1
4.2.0 4.1.0 4.0.9 4.0.8 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-slot-render-utility.php
superb-blocks / src / components / slots Last commit date
class-css-blocks-base-slot.php 2 years ago class-css-blocks-export-selected-slot.php 2 years ago class-css-blocks-export-single-slot.php 2 years ago class-css-blocks-target-slot.php 2 years ago class-premium-option-wrapper.php 2 years ago class-premium-slot.php 2 years ago class-slot-render-utility.php 2 years ago
class-slot-render-utility.php
61 lines
1 <?php
2
3 namespace SuperbAddons\Components\Slots;
4
5 defined('ABSPATH') || exit();
6
7 class SlotRenderUtility
8 {
9 private static $AllowedHTML = array(
10 'div' => array(
11 'data-type' => true,
12 'class' => array(),
13 'id' => array(),
14 'style' => array(),
15 ),
16 'select' => array(
17 'class' => array(),
18 'id' => array(),
19 'name' => array(),
20 'placeholder' => array(),
21 'multiple' => array(),
22 'style' => array(),
23 ),
24 'option' => array(
25 'value' => array(),
26 'selected' => array(),
27 ),
28 'input' => array(
29 'class' => array(),
30 'id' => array(),
31 'name' => array(),
32 'type' => array(),
33 'value' => array(),
34 'checked' => array(),
35 'style' => array(),
36 'data-action' => true,
37 ),
38 );
39
40 public static function Render($contentCallback)
41 {
42 add_filter('safe_style_css', function ($styles) {
43 if (!in_array('display', $styles)) {
44 $styles[] = 'display';
45 }
46
47 return $styles;
48 });
49 ob_start();
50 ($contentCallback)();
51 $content = ob_get_clean();
52 echo wp_kses(
53 $content,
54 array_merge(
55 wp_kses_allowed_html('post'),
56 self::$AllowedHTML
57 )
58 );
59 }
60 }
61