PluginProbe
bBlocks – Essential Gutenberg Blocks & Patterns Collection / trunk
bBlocks – Essential Gutenberg Blocks & Patterns Collection vtrunk
2.1.6 2.1.5 2.1.4 2.1.3 2.1.2 2.1.1 2.1.0 2.0.43 2.0.42 2.0.41 2.0.40 2.0.39 2.0.38 trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 All 106 releases
b-blocks / includes / Utils.php

Utils.php in bBlocks – Essential Gutenberg Blocks & Patterns Collection trunk, at includes/Utils.php

148 lines 3.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace BBlocks\Inc;
3
4 class Utils{
5 static function isPro(){
6 return b_blocks_fs()->is__premium_only() && b_blocks_fs()->can_use_premium_code();
7 }
8 static function valForZero( $value = '', $default = 'auto' ){
9 return !$value || 0 === intval( $value ) ? $default : $value;
10 }
11 static function allowedInnerHTML() {
12 global $allowedposttags;
13 return wp_parse_args( [
14 'style' => [],
15 'input' => [
16 'accept' => true,
17 'autocomplete' => true,
18 'autofocus' => true,
19 'checked' => true,
20 'class' => true,
21 'disabled' => true,
22 'id' => true,
23 'height' => true,
24 'min' => true,
25 'max' => true,
26 'minlenght' => true,
27 'maxlength' => true,
28 'name' => true,
29 'pattern' => true,
30 'placeholder' => true,
31 'readony' => true,
32 'required' => true,
33 'size' => true,
34 'src' => true,
35 'step' => true,
36 'type' => true,
37 'value' => true,
38 'width' => true,
39 ],
40 'iframe' => [
41 'allowfullscreen' => true,
42 'allowpaymentrequest' => true,
43 'height' => true,
44 'loading' => true,
45 'name' => true,
46 'referrerpolicy' => true,
47 'sandbox' => true,
48 'src' => true,
49 'srcdoc' => true,
50 'width' => true,
51 'aria-controls' => true,
52 'aria-current' => true,
53 'aria-describedby' => true,
54 'aria-details' => true,
55 'aria-expanded' => true,
56 'aria-hidden' => true,
57 'aria-label' => true,
58 'aria-labelledby' => true,
59 'aria-live' => true,
60 'class' => true,
61 'data-*' => true,
62 'dir' => true,
63 'hidden' => true,
64 'id' => true,
65 'lang' => true,
66 'style' => true,
67 'title' => true,
68 'role' => true,
69 'xml:lang' => true
70 ],
71 'svg' => [
72 'xmlns' => [],
73 'viewbox' => [],
74 'width' => [],
75 'height' => [],
76 'fill' => [],
77 'class' => [],
78 'style' => [],
79 ],
80 'g' => [
81 'fill' => [],
82 'stroke' => [],
83 'class' => [],
84 'style' => [],
85 ],
86 'path' => [
87 'd' => [],
88 'fill' => [],
89 'stroke' => [],
90 'class' => [],
91 'style' => [],
92 'stroke-width' => []
93 ],
94 'circle' => [
95 'cx' => [],
96 'cy' => [],
97 'r' => [],
98 'fill' => [],
99 'stroke' => [],
100 'class' => [],
101 'style' => [],
102 ],
103 'rect' => [
104 'x' => [],
105 'y' => [],
106 'width' => [],
107 'height' => [],
108 'fill' => [],
109 'stroke' => [],
110 'class' => [],
111 'style' => [],
112 ],
113 'ellipse' => [
114 'cx' => [],
115 'cy' => [],
116 'rx' => [],
117 'ry' => [],
118 'fill' => [],
119 'stroke' => [],
120 'class' => [],
121 'style' => [],
122 ],
123 'line' => [
124 'x1' => [],
125 'y1' => [],
126 'x2' => [],
127 'y2' => [],
128 'stroke' => [],
129 'class' => [],
130 'style' => [],
131 ],
132 'polyline' => [
133 'points' => [],
134 'fill' => [],
135 'stroke' => [],
136 'class' => [],
137 'style' => [],
138 ],
139 'polygon' => [
140 'points' => [],
141 'fill' => [],
142 'stroke' => [],
143 'class' => [],
144 'style' => [],
145 ]
146 ], $allowedposttags );
147 }
148 }