PluginProbe ʕ •ᴥ•ʔ
Superb Addons: Blocks, Patterns, Pre-built Pages, Sliders, Popups, Free Forms, Animations & More / 3.4.0
Superb Addons: Blocks, Patterns, Pre-built Pages, Sliders, Popups, Free Forms, Animations & More v3.4.0
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 1 year ago class-css-blocks-export-selected-slot.php 1 year ago class-css-blocks-export-single-slot.php 1 year ago class-css-blocks-target-slot.php 1 year ago class-premium-option-wrapper.php 1 year ago class-premium-slot.php 1 year ago class-slot-render-utility.php 1 year ago
class-slot-render-utility.php
70 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 'iframe' => array(
39 'class' => array(),
40 'src' => array(),
41 'loading' => array(),
42 'data-src' => true,
43 'data-noreload' => true,
44 'data-status' => true,
45 'data-id' => true,
46 )
47 );
48
49 public static function Render($contentCallback)
50 {
51 add_filter('safe_style_css', function ($styles) {
52 if (!in_array('display', $styles)) {
53 $styles[] = 'display';
54 }
55
56 return $styles;
57 });
58 ob_start();
59 ($contentCallback)();
60 $content = ob_get_clean();
61 echo wp_kses(
62 $content,
63 array_merge(
64 wp_kses_allowed_html('post'),
65 self::$AllowedHTML
66 )
67 );
68 }
69 }
70