PluginProbe
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More / 1.0.2
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More v1.0.2
2.4.1 2.4.0 2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.2 2.2.1 2.2.0 2.1.2 2.1.1 trunk 0.0.1 0.0.2 0.0.3 0.0.4 0.0.5 0.0.6 0.0.7 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 All 68 releases
better-payment / includes / Traits / Helper.php

Helper.php in Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More 1.0.2, at includes/Traits/Helper.php

298 lines 4.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Better_Payment\Lite\Traits;
4
5 /**
6 * Exit if accessed directly
7 */
8 if (!defined('ABSPATH')) {
9 exit;
10 }
11
12 /**
13 * Helper trait
14 *
15 * @since 0.0.1
16 */
17 trait Helper
18 {
19 use Elements, ElementorHelper, WordPressHelper;
20
21 public function bp_template_render($filePath, $variables = array(), $print = true)
22 {
23 $output = NULL;
24
25 if (file_exists($filePath)) {
26 // Extract the variables to a local namespace
27 extract($variables);
28
29 // Start output buffering
30 ob_start();
31
32 // Include the template file
33 include $filePath;
34
35 // End buffering and return its contents
36 $output = ob_get_clean();
37 }
38
39 if ( $print ) {
40 print $output;
41 }
42
43 return $output;
44 }
45
46 /**
47 * List of allowed html tag for wp_kses
48 *
49 * bp_allowed_tags
50 * @return array
51 */
52 public function bp_allowed_tags() {
53 return [
54 'a' => [
55 'href' => [],
56 'title' => [],
57 'class' => [],
58 'rel' => [],
59 'id' => [],
60 'style' => [],
61 'target' => [],
62 ],
63 'q' => [
64 'cite' => [],
65 'class' => [],
66 'id' => [],
67 ],
68 'img' => [
69 'src' => [],
70 'alt' => [],
71 'height' => [],
72 'width' => [],
73 'class' => [],
74 'id' => [],
75 'style' => []
76 ],
77 'span' => [
78 'class' => [],
79 'id' => [],
80 'style' => []
81 ],
82 'dfn' => [
83 'class' => [],
84 'id' => [],
85 'style' => []
86 ],
87 'time' => [
88 'datetime' => [],
89 'class' => [],
90 'id' => [],
91 'style' => [],
92 ],
93 'cite' => [
94 'title' => [],
95 'class' => [],
96 'id' => [],
97 'style' => [],
98 ],
99 'hr' => [
100 'class' => [],
101 'id' => [],
102 'style' => [],
103 ],
104 'b' => [
105 'class' => [],
106 'id' => [],
107 'style' => [],
108 ],
109 'p' => [
110 'class' => [],
111 'id' => [],
112 'style' => []
113 ],
114 'i' => [
115 'class' => [],
116 'id' => [],
117 'style' => []
118 ],
119 'u' => [
120 'class' => [],
121 'id' => [],
122 'style' => []
123 ],
124 's' => [
125 'class' => [],
126 'id' => [],
127 'style' => [],
128 ],
129 'br' => [],
130 'em' => [
131 'class' => [],
132 'id' => [],
133 'style' => []
134 ],
135 'code' => [
136 'class' => [],
137 'id' => [],
138 'style' => [],
139 ],
140 'mark' => [
141 'class' => [],
142 'id' => [],
143 'style' => [],
144 ],
145 'small' => [
146 'class' => [],
147 'id' => [],
148 'style' => []
149 ],
150 'abbr' => [
151 'title' => [],
152 'class' => [],
153 'id' => [],
154 'style' => [],
155 ],
156 'strong' => [
157 'class' => [],
158 'id' => [],
159 'style' => []
160 ],
161 'del' => [
162 'class' => [],
163 'id' => [],
164 'style' => []
165 ],
166 'ins' => [
167 'class' => [],
168 'id' => [],
169 'style' => []
170 ],
171 'sub' => [
172 'class' => [],
173 'id' => [],
174 'style' => [],
175 ],
176 'sup' => [
177 'class' => [],
178 'id' => [],
179 'style' => [],
180 ],
181 'div' => [
182 'class' => [],
183 'id' => [],
184 'style' => []
185 ],
186 'strike' => [
187 'class' => [],
188 'id' => [],
189 'style' => [],
190 ],
191 'acronym' => [],
192 'h1' => [
193 'class' => [],
194 'id' => [],
195 'style' => [],
196 ],
197 'h2' => [
198 'class' => [],
199 'id' => [],
200 'style' => [],
201 ],
202 'h3' => [
203 'class' => [],
204 'id' => [],
205 'style' => [],
206 ],
207 'h4' => [
208 'class' => [],
209 'id' => [],
210 'style' => [],
211 ],
212 'h5' => [
213 'class' => [],
214 'id' => [],
215 'style' => [],
216 ],
217 'h6' => [
218 'class' => [],
219 'id' => [],
220 'style' => [],
221 ],
222 'button' => [
223 'class' => [],
224 'id' => [],
225 'style' => [],
226 'data-paypal-info' => [],
227 ],
228 'center' => [
229 'class' => [],
230 'id' => [],
231 'style' => [],
232 ],
233 'ul' => [
234 'class' => [],
235 'id' => [],
236 'style' => [],
237 ],
238 'ol' => [
239 'class' => [],
240 'id' => [],
241 'style' => [],
242 ],
243 'li' => [
244 'class' => [],
245 'id' => [],
246 'style' => [],
247 ],
248 'table' => [
249 'class' => [],
250 'id' => [],
251 'style' => [],
252 'dir' => [],
253 'align' => [],
254 ],
255 'thead' => [
256 'class' => [],
257 'id' => [],
258 'style' => [],
259 'align' => [],
260 ],
261 'tbody' => [
262 'class' => [],
263 'id' => [],
264 'style' => [],
265 'align' => [],
266 ],
267 'tfoot' => [
268 'class' => [],
269 'id' => [],
270 'style' => [],
271 'align' => [],
272 ],
273 'th' => [
274 'class' => [],
275 'id' => [],
276 'style' => [],
277 'align' => [],
278 'colspan' => [],
279 'rowspan' => [],
280 ],
281 'tr' => [
282 'class' => [],
283 'id' => [],
284 'style' => [],
285 'align' => [],
286 ],
287 'td' => [
288 'class' => [],
289 'id' => [],
290 'style' => [],
291 'align' => [],
292 'colspan' => [],
293 'rowspan' => [],
294 ],
295 ];
296 }
297 }
298