PluginProbe ʕ •ᴥ•ʔ
AI Copilot – Content Generator / 1.5.4
AI Copilot – Content Generator v1.5.4
1.5.4 1.4.21 1.4.18 1.4.19 1.4.20 trunk 1.0.4 1.1.0 1.2.0 1.2.1 1.2.10 1.2.11 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 1.4.14 1.4.15 1.4.17 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.9
ai-copilot-content-generator / classes / html.php
ai-copilot-content-generator / classes Last commit date
helpers 1 week ago tables 1 week ago aIProviderInterface.php 1 week ago assets.php 1 week ago baseObject.php 1 week ago builderBlock.php 1 week ago controller.php 1 week ago date.php 1 week ago db.php 1 week ago dispatcher.php 1 week ago errors.php 1 week ago field.php 1 week ago fieldAdapter.php 1 week ago frame.php 1 week ago helper.php 1 week ago html.php 1 week ago installer.php 1 week ago installerDbUpdater.php 1 week ago integration.php 1 week ago modInstaller.php 1 week ago model.php 1 week ago module.php 1 week ago req.php 1 week ago response.php 1 week ago table.php 1 week ago uri.php 1 week ago user.php 1 week ago utils.php 1 week ago validator.php 1 week ago view.php 1 week ago
html.php
1427 lines
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit;
4 }
5 class WaicHtml {
6 public static $fontsList = array();
7 public static $categoriesOptions = array();
8 public static $productsOptions = array();
9 public static $colsType = 'standart';
10 public static $colClasses = array(
11 'standart' => array('label' => 'col-3 col-xl-2', 'values' => 'col-8 col-sm-9 col-xl-9', 'full' => 'col-12'),
12 'compact' => array('label' => 'col-3 col-xl-3 col-sm-5', 'info' => 'col-xs-2 col-sm-1', 'values' => 'col-9 col-xl-9 col-sm-7', 'full' => 'col-12'),
13 'popup' => array('label' => 'col-5 col-sm-3', 'info' => 'col-1', 'values' => 'col-7 col-sm-9', 'full' => 'col-12'),
14 'super' => array('label' => 'col-3 col-sm-2', 'info' => 'col-1', 'values' => 'col-8 col-sm-9', 'full' => 'col-12'),
15 );
16 public static function setColType( $type ) {
17 if (isset(self::$colClasses[$type])) {
18 self::$colsType = $type;
19 }
20 }
21 public static function blockClasses( $type ) {
22 return 'options-' . $type . ' ' . WaicUtils::getArrayValue(self::$colClasses[self::$colsType], $type);
23 }
24 public static function echoEscapedHtml( $html ) {
25 add_filter('esc_html', array('WaicHtml', 'skipHtmlEscape'), 99, 2);
26 echo esc_html($html);
27 remove_filter('esc_html', array('WaicHtml', 'skipHtmlEscape'), 99, 2);
28 }
29 public static function skipHtmlEscape( $safe_text, $text ) {
30 return $text;
31 }
32 public static function block( $name, $params = array('attrs' => '', 'value' => '') ) {
33 $output .= '<p class="toe_' . self::nameToClassId($name) . '">' . $params['value'] . '</p>';
34 return $output;
35 }
36 public static function nameToClassId( $name, $params = array() ) {
37 if (!empty($params) && isset($params['attrs']) && strpos($params['attrs'], 'id="') !== false) {
38 preg_match('/id="(.+)"/ui', $params['attrs'], $idMatches);
39 if ($idMatches[1]) {
40 return $idMatches[1];
41 }
42 }
43 return str_replace(array('[', ']'), '', $name);
44 }
45 public static function textarea( $name, $params = array('attrs' => '', 'value' => '', 'rows' => 8, 'cols' => 50) ) {
46 $params['attrs'] = isset($params['attrs']) ? $params['attrs'] : '';
47 $params['rows'] = isset($params['rows']) ? $params['rows'] : 8;
48 $params['cols'] = isset($params['cols']) ? $params['cols'] : 50;
49 if (isset($params['required']) && $params['required']) {
50 $params['attrs'] .= ' required '; // HTML5 "required" validation attr
51 }
52 if (isset($params['placeholder']) && $params['placeholder']) {
53 $params['attrs'] .= ' placeholder="' . esc_attr($params['placeholder']) . '"'; // HTML5 "required" validation attr
54 }
55 if (isset($params['disabled']) && $params['disabled']) {
56 $params['attrs'] .= ' disabled ';
57 }
58 if (isset($params['readonly']) && $params['readonly']) {
59 $params['attrs'] .= ' readonly ';
60 }
61 if (isset($params['auto_width']) && $params['auto_width']) {
62 unset($params['rows']);
63 unset($params['cols']);
64 }
65 echo '<textarea' . ( empty($name) ? '' : ' name="' . esc_attr($name) . '"' ) . ' ';
66 if (!empty($params['attrs'])) {
67 self::echoEscapedHtml($params['attrs']);
68 }
69 echo ( isset($params['rows']) ? ' rows="' . esc_attr($params['rows']) . '"' : '' ) .
70 ( isset($params['cols']) ? ' cols="' . esc_attr($params['cols']) . '"' : '' ) . '>' .
71 ( isset($params['value']) ? esc_html($params['value']) : '' ) .
72 '</textarea>';
73 }
74 public static function input( $name, $params = array('attrs' => '', 'type' => 'text', 'value' => '') ) {
75 $params['attrs'] = isset($params['attrs']) ? $params['attrs'] : '';
76 $params['attrs'] .= self::_dataToAttrs($params);
77 if (isset($params['required']) && $params['required']) {
78 $params['attrs'] .= ' required '; // HTML5 "required" validation attr
79 }
80 if (isset($params['placeholder']) && $params['placeholder']) {
81 $params['attrs'] .= ' placeholder="' . esc_attr($params['placeholder']) . '"'; // HTML5 "required" validation attr
82 }
83 if (isset($params['disabled']) && $params['disabled']) {
84 $params['attrs'] .= ' disabled ';
85 }
86 if (isset($params['readonly']) && $params['readonly']) {
87 $params['attrs'] .= ' readonly ';
88 }
89 $params['type'] = isset($params['type']) ? $params['type'] : 'text';
90 $params['value'] = isset($params['value']) ? $params['value'] : '';
91
92 echo '<input type="' . esc_attr($params['type']) . '"' . ( empty($name) ? '' : ' name="' . esc_attr($name) . '"' ) . ' value="' . esc_attr($params['value']) . '" ';
93 if (!empty($params['attrs'])) {
94 self::echoEscapedHtml($params['attrs']);
95 }
96 echo ' />';
97 }
98 public static function inputShortcode( $name, $params = array() ) {
99 $value = $params['value'];
100 self::input('', array('value' => $value, 'attrs' => 'readonly class="wbw-flat-input wbw-nosave wbw-shortcode wbw-width' . ( strlen($value) <= 20 ? 200 : 300 ) . '"'));
101 }
102 private static function _dataToAttrs( $params ) {
103 $res = '';
104 foreach ($params as $k => $v) {
105 if (strpos($k, 'data-') === 0) {
106 $res .= ' ' . $k . '="' . $v . '"';
107 }
108 }
109 return $res;
110 }
111 public static function text( $name, $params = array('attrs' => '', 'value' => '') ) {
112 $params['type'] = 'text';
113 self::input($name, $params);
114 }
115 public static function email( $name, $params = array('attrs' => '', 'value' => '') ) {
116 $params['type'] = 'email';
117 self::input($name, $params);
118 }
119 public static function reset( $name, $params = array('attrs' => '', 'value' => '') ) {
120 $params['type'] = 'reset';
121 self::input($name, $params);
122 }
123 public static function password( $name, $params = array('attrs' => '', 'value' => '') ) {
124 $params['type'] = 'password';
125 self::input($name, $params);
126 }
127 public static function hidden( $name, $params = array('attrs' => '', 'value' => '') ) {
128 $params['type'] = 'hidden';
129 self::input($name, $params);
130 }
131 public static function number( $name, $params = array('attrs' => '', 'value' => '') ) {
132 $params['type'] = 'number';
133 if (!isset($params['attrs'])) {
134 $params['attrs'] = '';
135 }
136 if (isset($params['min'])) {
137 $params['attrs'] .= ' min="' . $params['min'] . '"';
138 }
139 if (isset($params['max'])) {
140 $params['attrs'] .= ' max="' . $params['max'] . '"';
141 }
142 if (isset($params['step'])) {
143 $params['attrs'] .= ' step="' . $params['step'] . '"';
144 }
145 self::input($name, $params);
146 }
147 public static function checkbox( $name, $params = array('attrs' => '', 'value' => '', 'checked' => '') ) {
148 $params['type'] = 'checkbox';
149 $params['checked'] = isset($params['checked']) && $params['checked'] ? ' checked' : '';
150 if ( !isset($params['value']) || null == $params['value'] ) {
151 $params['value'] = 1;
152 }
153 if (!isset($params['attrs'])) {
154 $params['attrs'] = '';
155 }
156 $params['attrs'] .= $params['checked'];
157 self::input($name, $params);
158 }
159 public static function checkboxToggle( $name, $params = array('attrs' => '', 'value' => '', 'checked' => '') ) {
160 $params['type'] = 'checkbox';
161 $params['checked'] = isset($params['checked']) && $params['checked'] ? 'checked' : '';
162 if ( !isset($params['value']) || ( null === $params['value'] ) ) {
163 $params['value'] = 1;
164 }
165 $id = ( empty($params['id']) ? self::nameToClassId($name) . wp_rand(9, 9999) : $params['id'] );
166 $params['attrs'] = 'id="' . esc_attr($id) . '" class="toggle" ' . ( isset($params['attrs']) ? $params['attrs'] . ' ' : '' ) . $params['checked'];
167
168 self::input($name, $params);
169 echo '<label for="' . esc_attr($id) . '" class="toggle"></label>';
170 }
171 public static function checkboxlist( $name, $params = array('options' => array(), 'attrs' => '', 'checked' => '', 'delim' => '<br />', 'usetable' => 5), $delim = '<br />' ) {
172 if (!strpos($name, '[]')) {
173 $name .= '[]';
174 }
175 $i = 0;
176 if ($params['options']) {
177 if (!isset($params['delim'])) {
178 $params['delim'] = $delim;
179 }
180 if (!empty($params['usetable'])) {
181 echo '<table><tr>';
182 }
183 foreach ($params['options'] as $v) {
184 if (!empty($params['usetable'])) {
185 if ( ( 0 != $i ) && ( 0 == $i%$params['usetable'] ) ) {
186 echo '</tr><tr>';
187 }
188 echo '<td>';
189 }
190 self::checkboxToggle($name, array(
191 'attrs' => !empty($params['attrs']),
192 'value' => empty($v['value']) ? $v['id'] : $v['value'],
193 'checked' => $v['checked'],
194 'id' => $v['id'],
195 ));
196 echo '&nbsp;';
197 if (!empty($v['text'])) {
198 self::echoEscapedHtml($v['text']);
199 }
200 if (!empty($params['delim'])) {
201 self::echoEscapedHtml($params['delim']);
202 }
203 if (!empty($params['usetable'])) {
204 echo '</td>';
205 }
206 $i++;
207 }
208 if (!empty($params['usetable'])) {
209 echo '</tr></table>';
210 }
211 }
212 }
213 public static function submit( $name, $params = array('attrs' => '', 'value' => '') ) {
214 $params['type'] = 'submit';
215 self::input($name, $params);
216 }
217 public static function img( $src, $usePlugPath = 1, $params = array('width' => '', 'height' => '', 'attrs' => '') ) {
218 if ($usePlugPath) {
219 $src = WAIC_IMG_PATH . $src;
220 }
221 echo '<img src="' . esc_url($src) . '" '
222 . ( isset($params['width']) ? 'width="' . esc_attr($params['width']) . '"' : '' )
223 . ' '
224 . ( isset($params['height']) ? 'height="' . esc_attr($params['height']) . '"' : '' )
225 . ' ';
226 if (!empty($params['attrs'])) {
227 self::echoEscapedHtml($params['attrs']);
228 }
229 echo ' />';
230 }
231 public static function selectbox( $name, $params = array('attrs' => '', 'options' => array(), 'value' => '') ) {
232 $attrs = WaicUtils::getArrayValue($params, 'attrs');
233 if (WaicUtils::getArrayValue($params, 'required', false)) {
234 $attrs .= ' required ';
235 }
236 echo '<select' . ( empty($name) ? '' : ' name="' . esc_attr($name) . '"' ) . ' ';
237 if (!empty($attrs)) {
238 self::echoEscapedHtml($attrs);
239 }
240 echo '>';
241 $default = WaicUtils::getArrayValue($params, 'default');
242 if (!empty($default)) {
243 echo '<option value="">' . esc_html($default) . '</option>';
244 }
245 $existValue = isset($params['value']);
246 $keyValue = WaicUtils::getArrayValue($params, 'key') == 'value';
247 $add = isset($params['add']) ? $params['add'] : '';
248 if (!empty($params['options'])) {
249 foreach ($params['options'] as $k => $v) {
250 $key = ( $keyValue ? $v : $k ) . $add;
251 $a = '';
252 if (is_array($v)) {
253 $a = isset($v['attrs']) ? $v['attrs'] : '';
254 $v = isset($v['label']) ? $v['label'] : '???';
255 }
256 echo '<option value="' . esc_attr($key) . '"' . ( $existValue && $key == $params['value'] ? ' selected="true"' : '' );
257 if (!empty($a)) {
258 self::echoEscapedHtml($a);
259 }
260 echo '>' . esc_html($v) . '</option>';
261 }
262 }
263 echo '</select>';
264 }
265 public static function selectlist( $name, $params = array('attrs' => '', 'size' => 5, 'class' => '', 'options' => array(), 'value' => '') ) {
266 if (!strpos($name, '[]')) {
267 $name .= '[]';
268 }
269 if ( !isset($params['size']) || !is_numeric($params['size']) || ( '' == $params['size'] ) ) {
270 $params['size'] = 5;
271 }
272 $params['class'] = isset($params['class']) ? $params['class'] : '';
273 $params['attrs'] = isset($params['attrs']) ? $params['attrs'] : '';
274 $params['attrs'] .= self::_dataToAttrs($params);
275
276 if (empty($params['no_chosen'])) {
277 $params['class'] .= ' wbw-chosen';
278 }
279
280 echo '<select multiple="multiple" class="' . esc_attr($params['class']) . '" size="' . esc_attr($params['size']) . '"' . ( empty($name) ? '' : ' name="' . esc_attr($name) . '"' ) . ' ';
281 if (!empty($params['attrs'])) {
282 self::echoEscapedHtml($params['attrs']);
283 }
284 echo '>';
285
286 $params['value'] = isset($params['value']) ? (array) $params['value'] : array();
287 $keyValue = WaicUtils::getArrayValue($params, 'key') == 'value';
288 $options = $params['options'];
289 if (!empty($params['value'])) {
290 foreach ($params['value'] as $v) {
291 $k = ( $keyValue ? array_search($v, $options) : ( isset($options[$v]) ? $v : false ) );
292 if (false !== $k) {
293 echo '<option value="' . esc_attr($v) . '" selected>' . esc_html($options[$k]) . '</option>';
294 unset($options[$k]);
295 }
296 }
297 }
298 if (!empty($options)) {
299 foreach ($options as $k => $v) {
300 $key = ( $keyValue ? $v : $k );
301 echo '<option value="' . esc_attr($key) . '">' . esc_html($v) . '</option>';
302 }
303 }
304 echo '</select>';
305 }
306 public static function file( $name, $params = array() ) {
307 $id = ( empty($params['id']) ? self::nameToClassId($name) . wp_rand(9, 9999) : $params['id'] );
308 echo '<div class="wbw-inputfile">
309 <input type="file" id="' . esc_attr($id) . '" name="' . esc_attr($name) . '">
310 <label for="' . esc_attr($id) . '">
311 <div class="wbw-namefile"></div>
312 <div class="button buttonfile">
313 <i class="fa fa-upload" aria-hidden="true"></i>' . esc_html__('Select file', 'ai-copilot-content-generator') . '
314 </div>
315 </label>
316 </div>';
317 }
318 public static function button( $params = array('attrs' => '', 'value' => '') ) {
319 echo '<button ';
320 if (!empty($params['attrs'])) {
321 self::echoEscapedHtml($params['attrs']);
322 }
323 echo '>' . esc_html($params['value']) . '</button>';
324 }
325 public static function buttonA( $params = array('attrs' => '', 'value' => '') ) {
326 echo '<a href="#" ';
327 if (!empty($params['attrs'])) {
328 self::echoEscapedHtml($params['attrs']);
329 }
330 echo '>' . esc_html($params['value']) . '</a>';
331 }
332 public static function inputButton( $params = array('attrs' => '', 'value' => '') ) {
333 if (!is_array($params)) {
334 $params = array();
335 }
336 $params['type'] = 'button';
337 self::input('', $params);
338 }
339 public static function radiobuttons( $name, $params = array('attrs' => '', 'options' => array(), 'value' => '') ) {
340 if (isset($params['options']) && is_array($params['options']) && !empty($params['options'])) {
341 //$params['labeled'] = isset($params['labeled']) ? $params['labeled'] : false;
342 $params['attrs'] = isset($params['attrs']) ? $params['attrs'] : '';
343 $ul = !empty($params['ul']);
344 $params['no_br'] = isset($params['no_br']) && !$ul ? $params['no_br'] : false;
345 if (empty($params['value'])) {
346 $params['value'] = 0;
347 }
348 if ($ul) {
349 echo '<ul>';
350 }
351 foreach ($params['options'] as $key => $val) {
352 $checked = ( $key == $params['value'] ) ? 'checked="checked"' : '';
353 $id = $name . '_' . $key;
354 if ($ul) {
355 echo '<li>';
356 }
357 self::input($name, array('attrs' => $params['attrs'] . ' ' . $checked . ' id="' . esc_attr($id) . '"', 'type' => 'radio', 'value' => $key));
358 echo '<label for="' . esc_attr($id) . '">' . esc_html($val) . '</label>';
359 if ($ul) {
360 echo '</li>';
361 } else if (!$params['no_br']) {
362 echo '<br />';
363 }
364 }
365 if ($ul) {
366 echo '</ul>';
367 }
368 }
369 }
370 public static function radiobutton( $name, $params = array('attrs' => '', 'value' => '', 'checked' => '') ) {
371 $params['type'] = 'radio';
372 $params['attrs'] = isset($params['attrs']) ? $params['attrs'] : '';
373 if (isset($params['checked']) && $params['checked']) {
374 $params['attrs'] .= ' checked';
375 }
376 self::input($name, $params);
377 }
378 public static function formStart( $name, $params = array('action' => '', 'method' => 'GET', 'attrs' => '', 'hideMethodInside' => false) ) {
379 $params['attrs'] = isset($params['attrs']) ? $params['attrs'] : '';
380 $params['action'] = isset($params['action']) ? $params['action'] : '';
381 $params['method'] = isset($params['method']) ? $params['method'] : 'GET';
382 echo '<form name="' . esc_attr($name) . '" action="' . esc_attr($params['action']) . '" method="' . esc_attr($params['method']) . '" ';
383 if (!empty($params['attrs'])) {
384 self::echoEscapedHtml($params['attrs']);
385 }
386 echo '>';
387
388 if (isset($params['hideMethodInside']) && $params['hideMethodInside']) {
389 self::hidden('method', array('value' => $params['method']));
390 }
391 }
392 public static function formEnd() {
393 echo '</form>';
394 }
395 public static function colorPicker( $name, $params = array('value' => '', 'label' => '') ) {
396 $value = isset($params['value']) ? $params['value'] : '';
397 $label = isset($params['label']) ? $params['label'] : '';
398 echo '<div class="wbw-color-picker">
399 <div class="wbw-color-wrapper">
400 <div class="wbw-color-preview"></div>
401 </div>
402 <input type="text" class="wbw-color-input" name="' . esc_attr($name) . '" value="' . esc_attr($value) . '"';
403 if (!empty($params['attrs'])) {
404 self::echoEscapedHtml($params['attrs']);
405 }
406 echo '>';
407 if (!empty($label)) {
408 echo '<label class="right-label">' . esc_html($label) . '</label>';
409 }
410 echo '</div>';
411 }
412 public static function slider( $name, $params = array('value' => '', 'label' => '') ) {
413
414 //https://github.com/IonDen/ion.rangeSlider?tab=readme-ov-file
415 $skin = empty($params['skin']) ? 'round' : $params['skin'];
416 echo '<div class="wbw-slider wbw-slider-' . esc_attr($skin) . '">' .
417 ' <input type="text" name="' . esc_attr($name) .
418 ( empty($params['class']) ? '' : '" class="' . esc_attr($params['class']) ) .
419 ( empty($params['id']) ? '' : '" id="' . esc_attr($params['id']) ) .
420 '" value="' . esc_attr(empty($params['value']) ? '' : $params['value']) .
421 '" data-hide-min-max="' . esc_attr(empty($params['hide-min-max']) ? '0' : $params['hide-min-max']) .
422 '" data-skin="' . esc_attr($skin) .
423 '" data-type="' . esc_attr(empty($params['type']) ? 'single' : $params['type']) .
424 '" data-step="' . esc_attr(empty($params['step']) ? '1' : $params['step']) .
425 '" data-min="' . esc_attr(empty($params['min']) ? '0' : $params['min']) .
426 '" data-max="' . esc_attr(empty($params['max']) ? '100' : $params['max']) .
427 '">' .
428 '</div>';
429 }
430 public static function nonceForAction( $action ) {
431 self::hidden('_wpnonce', array('value' => wp_create_nonce(strtolower($action))));
432 }
433 public static function selectIcon( $name, $params ) {
434 echo '<div class="button chooseLoaderIcon">' . esc_html__('Choose Icon', 'ai-copilot-content-generator') . '</div>';
435 }
436 public static function proOptionLink( $url = '', $label = '' ) {
437 echo '<a href="' . esc_url( empty($url) ? WaicUri::generatePluginLink() : $url ) . '" target="_blank" class="wbw-prolink">' . ( empty($label) ? esc_html__('PRO', 'ai-copilot-content-generator') : esc_html($label) ) . '</a>';
438 }
439 public static function selectFontList( $name, $params = array('attrs' => '', 'value' => '') ) {
440 $attrs = WaicUtils::getArrayValue($params, 'attrs');
441 $value = WaicUtils::getArrayValue($params, 'value');
442
443 echo '<select name="' . esc_attr($name) . '" ';
444 if (!empty($params['attrs'])) {
445 self::echoEscapedHtml($params['attrs']);
446 }
447 echo '><option value="">' . esc_html__('Default', 'ai-copilot-content-generator') . '</option>';
448
449 $standart = WaicDispatcher::applyFilters('getFontsList', array(), 'standart');
450 $fonts = array_merge($standart, WaicDispatcher::applyFilters('getFontsList', array(), ''));
451 natsort($fonts);
452
453 foreach ($fonts as $font) {
454 echo '<option value="' . esc_attr($font) . '" data-standart="' . ( in_array($font, $standart) ? 1 : 0 ) . '" ' . ( $font == $value ? ' selected="true"' : '' ) . '>' . esc_html($font) . '</option>';
455 }
456 echo '</select>';
457 }
458 public static function fontStyleBlock( $preBlock, $preName, $data ) {
459 $name = $preName . '_font';
460 $block = $preBlock . '[' . $name . ']';
461 self::selectbox($block, array(
462 'options' => self::getAllFontsList(),
463 'value' => WaicUtils::getArrayValue($data, $name),
464 'attrs' => 'class="wbw-small-field"',
465 ));
466 $name = $preName . '_style';
467 $block = $preBlock . '[' . $name . ']';
468 self::selectbox($block, array(
469 'options' => self::getFontStyles(),
470 'value' => WaicUtils::getArrayValue($data, $name),
471 'attrs' => 'class="wbw-field-mini"',
472 ));
473 $name = $preName . '_color';
474 $block = $preBlock . '[' . $name . ']';
475 self::colorpicker($block, array(
476 'value' => WaicUtils::getArrayValue($data, $name),
477 ));
478 $name = $preName . '_size';
479 $block = $preBlock . '[' . $name . ']';
480 self::number($block, array(
481 'value' => WaicUtils::getArrayValue($data, $name),
482 'attrs' => 'class="wbw-field-micro"',
483 ));
484 }
485 public static function sizeBlock( $preBlock, $preName, $data ) {
486 $name = $preName . '_width';
487 $block = $preBlock . '[' . $name . ']';
488 self::number($block, array(
489 'value' => WaicUtils::getArrayValue($data, $name),
490 'attrs' => 'class="wbw-field-micro"',
491 'min' => 0,
492 ));
493 $name = $preName . '_height';
494 $block = $preBlock . '[' . $name . ']';
495 self::number($block, array(
496 'value' => WaicUtils::getArrayValue($data, $name),
497 'attrs' => 'class="wbw-field-micro"',
498 'min' => 0,
499 ));
500 }
501 public static function colorSizeBlock( $preBlock, $preName, $data, $withFilter = false ) {
502 $name = $preName . '_color';
503 $block = $preBlock . '[' . $name . ']';
504 self::colorpicker($block, array(
505 'value' => WaicUtils::getArrayValue($data, $name),
506 ));
507 if ($withFilter) {
508 $name = $preName . '_color_filter';
509 $block = $preBlock . '[' . $name . ']';
510 self::hidden($block, array(
511 'value' => WaicUtils::getArrayValue($data, $name),
512 'attrs' => 'class="wbw-color-filter"',
513 ));
514 }
515 self::sizeBlock( $preBlock, $preName, $data );
516 }
517 public static function bgSizeBlock( $preBlock, $preName, $data ) {
518 $name = $preName . '_bg';
519 $block = $preBlock . '[' . $name . ']';
520 self::colorpicker($block, array(
521 'value' => WaicUtils::getArrayValue($data, $name),
522 ));
523 self::sizeBlock( $preBlock, $preName, $data );
524 }
525 public static function bgPaddingsBlock( $preBlock, $preName, $data ) {
526 $name = $preName . '_bg';
527 $block = $preBlock . '[' . $name . ']';
528 self::colorpicker($block, array(
529 'value' => WaicUtils::getArrayValue($data, $name),
530 ));
531 self::paddingsBlock( $preBlock, $preName, $data );
532 }
533 public static function bgHeightPadBlock( $preBlock, $preName, $data ) {
534 $name = $preName . '_bg';
535 $block = $preBlock . '[' . $name . ']';
536 self::colorpicker($block, array(
537 'value' => WaicUtils::getArrayValue($data, $name),
538 ));
539 $name = $preName . '_height';
540 $block = $preBlock . '[' . $name . ']';
541 self::number($block, array(
542 'value' => WaicUtils::getArrayValue($data, $name),
543 'attrs' => 'class="wbw-field-micro"',
544 ));
545 $name = $preName . '_left';
546 $block = $preBlock . '[' . $name . ']';
547 self::number($block, array(
548 'value' => WaicUtils::getArrayValue($data, $name),
549 'attrs' => 'class="wbw-field-micro"',
550 ));
551 $name = $preName . '_right';
552 $block = $preBlock . '[' . $name . ']';
553 self::number($block, array(
554 'value' => WaicUtils::getArrayValue($data, $name),
555 'attrs' => 'class="wbw-field-micro"',
556 ));
557 }
558 public static function bordersBlock( $preBlock, $preName, $data ) {
559 $name = $preName . '_border_color';
560 $block = $preBlock . '[' . $name . ']';
561 self::colorpicker($block, array(
562 'value' => WaicUtils::getArrayValue($data, $name),
563 ));
564 $name = $preName . '_border_style';
565 $block = $preBlock . '[' . $name . ']';
566 self::selectbox($block, array(
567 'options' => self::getBorderStyles(),
568 'value' => WaicUtils::getArrayValue($data, $name),
569 'attrs' => 'class="wbw-field-mini"',
570 ));
571 $name = $preName . '_border_size';
572 $block = $preBlock . '[' . $name . ']';
573 self::number($block, array(
574 'value' => WaicUtils::getArrayValue($data, $name),
575 'attrs' => 'class="wbw-field-micro"',
576 ));
577 }
578 public static function iconColorSizeBlock( $preBlock, $preName, $data, $icons, $check = false ) {
579 if ($check) {
580 $name = 'e_' . $preName;
581 $block = $preBlock . '[' . $name . ']';
582 self::checkbox($block, array(
583 'checked' => WaicUtils::getArrayValue($data, $name, 0),
584 ));
585 }
586 $name = $preName . '_icon';
587 $block = $preBlock . '[' . $name . ']';
588 self::selectbox($block, array(
589 'options' => $icons,
590 'value' => WaicUtils::getArrayValue($data, $name),
591 'attrs' => 'class="wbw-small-field"',
592 ));
593 $name = $preName . '_color';
594 $block = $preBlock . '[' . $name . ']';
595 self::colorpicker($block, array(
596 'value' => WaicUtils::getArrayValue($data, $name),
597 ));
598 $name = $preName . '_size';
599 $block = $preBlock . '[' . $name . ']';
600 self::number($block, array(
601 'value' => WaicUtils::getArrayValue($data, $name),
602 'attrs' => 'class="wbw-field-micro"',
603 ));
604 }
605 public static function shadowBlock( $preBlock, $preName, $data ) {
606 $name = $preName . '_shadow_color';
607 $block = $preBlock . '[' . $name . ']';
608 self::colorpicker($block, array(
609 'value' => WaicUtils::getArrayValue($data, $name),
610 ));
611 $name = $preName . '_shadow_alpha';
612 $block = $preBlock . '[' . $name . ']';
613 self::number($block, array(
614 'value' => WaicUtils::getArrayValue($data, $name),
615 'attrs' => 'class="wbw-field-micro"',
616 'min' => 0,
617 ));
618 $name = $preName . '_shadow_x';
619 $block = $preBlock . '[' . $name . ']';
620 self::number($block, array(
621 'value' => WaicUtils::getArrayValue($data, $name),
622 'attrs' => 'class="wbw-field-micro"',
623 'min' => 0,
624 ));
625 $name = $preName . '_shadow_y';
626 $block = $preBlock . '[' . $name . ']';
627 self::number($block, array(
628 'value' => WaicUtils::getArrayValue($data, $name),
629 'attrs' => 'class="wbw-field-micro"',
630 'min' => 0,
631 ));
632 $name = $preName . '_shadow_blur';
633 $block = $preBlock . '[' . $name . ']';
634 self::number($block, array(
635 'value' => WaicUtils::getArrayValue($data, $name),
636 'attrs' => 'class="wbw-field-micro"',
637 'min' => 0,
638 ));
639 $name = $preName . '_shadow_spread';
640 $block = $preBlock . '[' . $name . ']';
641 self::number($block, array(
642 'value' => WaicUtils::getArrayValue($data, $name),
643 'attrs' => 'class="wbw-field-micro"',
644 'min' => 0,
645 ));
646 }
647 public static function cornerRadiusBlock( $preBlock, $preName, $data ) {
648 $sides = array('t', 'r', 'b', 'l');
649 foreach ($sides as $s) {
650 $name = $preName . '_corner_' . $s;
651 $block = $preBlock . '[' . $name . ']';
652 self::number($block, array(
653 'value' => WaicUtils::getArrayValue($data, $name),
654 'attrs' => 'class="wbw-field-micro"',
655 'min' => 0,
656 ));
657 }
658 }
659
660 public static function paddingsBlock( $preBlock, $preName, $data, $typ = 'padding' ) {
661 $sides = array('t', 'r', 'b', 'l');
662 foreach ($sides as $s) {
663 $name = $preName . '_' . $typ . '_' . $s;
664 $block = $preBlock . '[' . $name . ']';
665 self::number($block, array(
666 'value' => WaicUtils::getArrayValue($data, $name),
667 'attrs' => 'class="wbw-field-micro"',
668 'min' => 0,
669 ));
670 }
671 }
672 public static function getFontsList() {
673 return array(
674 'ABeeZee',
675 'Abel',
676 'Abril Fatface',
677 'Aclonica',
678 'Acme',
679 'Actor',
680 'Adamina',
681 'Advent Pro',
682 'Aguafina Script',
683 'Akronim',
684 'Aladin',
685 'Aldrich',
686 'Alef',
687 'Alegreya',
688 'Alegreya SC',
689 'Alegreya Sans',
690 'Alegreya Sans SC',
691 'Alex Brush',
692 'Alfa Slab One',
693 'Alice',
694 'Alike',
695 'Alike Angular',
696 'Allan',
697 'Allerta',
698 'Allerta Stencil',
699 'Allura',
700 'Almendra',
701 'Almendra Display',
702 'Almendra SC',
703 'Amarante',
704 'Amaranth',
705 'Amatic SC',
706 'Amethysta',
707 'Amiri',
708 'Anaheim',
709 'Andada',
710 'Andika',
711 'Angkor',
712 'Annie Use Your Telescope',
713 'Anonymous Pro',
714 'Antic',
715 'Antic Didone',
716 'Antic Slab',
717 'Anton',
718 'Arapey',
719 'Arbutus',
720 'Arbutus Slab',
721 'Architects Daughter',
722 'Archivo Black',
723 'Archivo Narrow',
724 'Arimo',
725 'Arizonia',
726 'Armata',
727 'Artifika',
728 'Arvo',
729 'Asap',
730 'Asset',
731 'Astloch',
732 'Asul',
733 'Atomic Age',
734 'Aubrey',
735 'Audiowide',
736 'Autour One',
737 'Average',
738 'Average Sans',
739 'Averia Gruesa Libre',
740 'Averia Libre',
741 'Averia Sans Libre',
742 'Averia Serif Libre',
743 'Bad Script',
744 'Balthazar',
745 'Bangers',
746 'Basic',
747 'Battambang',
748 'Baumans',
749 'Bayon',
750 'Belgrano',
751 'Belleza',
752 'BenchNine',
753 'Bentham',
754 'Berkshire Swash',
755 'Bevan',
756 'Bigelow Rules',
757 'Bigshot One',
758 'Bilbo',
759 'Bilbo Swash Caps',
760 'Biryani',
761 'Bitter',
762 'Black Ops One',
763 'Bokor',
764 'Bonbon',
765 'Boogaloo',
766 'Bowlby One',
767 'Bowlby One SC',
768 'Brawler',
769 'Bree Serif',
770 'Bubblegum Sans',
771 'Bubbler One',
772 'Buenard',
773 'Butcherman',
774 'Butterfly Kids',
775 'Cabin',
776 'Cabin Condensed',
777 'Cabin Sketch',
778 'Caesar Dressing',
779 'Cagliostro',
780 'Calligraffitti',
781 'Cambay',
782 'Cambo',
783 'Candal',
784 'Cantarell',
785 'Cantata One',
786 'Cantora One',
787 'Capriola',
788 'Cardo',
789 'Carme',
790 'Carrois Gothic',
791 'Carrois Gothic SC',
792 'Carter One',
793 'Caudex',
794 'Cedarville Cursive',
795 'Ceviche One',
796 'Changa One',
797 'Chango',
798 'Chau Philomene One',
799 'Chela One',
800 'Chelsea Market',
801 'Chenla',
802 'Cherry Cream Soda',
803 'Cherry Swash',
804 'Chewy',
805 'Chicle',
806 'Chivo',
807 'Cinzel',
808 'Cinzel Decorative',
809 'Clicker Script',
810 'Coda',
811 'Codystar',
812 'Combo',
813 'Comfortaa',
814 'Coming Soon',
815 'Concert One',
816 'Condiment',
817 'Content',
818 'Contrail One',
819 'Convergence',
820 'Cookie',
821 'Copse',
822 'Corben',
823 'Courgette',
824 'Cousine',
825 'Coustard',
826 'Covered By Your Grace',
827 'Crafty Girls',
828 'Creepster',
829 'Crete Round',
830 'Crimson Text',
831 'Croissant One',
832 'Crushed',
833 'Cuprum',
834 'Cutive',
835 'Cutive Mono',
836 'Damion',
837 'Dancing Script',
838 'Dangrek',
839 'Dawning of a New Day',
840 'Days One',
841 'Dekko',
842 'Delius',
843 'Delius Swash Caps',
844 'Delius Unicase',
845 'Della Respira',
846 'Denk One',
847 'Devonshire',
848 'Dhurjati',
849 'Didact Gothic',
850 'Diplomata',
851 'Diplomata SC',
852 'Domine',
853 'Donegal One',
854 'Doppio One',
855 'Dorsa',
856 'Dosis',
857 'Dr Sugiyama',
858 'Droid Sans',
859 'Droid Sans Mono',
860 'Droid Serif',
861 'Duru Sans',
862 'Dynalight',
863 'EB Garamond',
864 'Eagle Lake',
865 'Eater',
866 'Economica',
867 'Ek Mukta',
868 'Electrolize',
869 'Elsie',
870 'Elsie Swash Caps',
871 'Emblema One',
872 'Emilys Candy',
873 'Engagement',
874 'Englebert',
875 'Enriqueta',
876 'Erica One',
877 'Esteban',
878 'Euphoria Script',
879 'Ewert',
880 'Exo',
881 'Exo 2',
882 'Expletus Sans',
883 'Fanwood Text',
884 'Fascinate',
885 'Fascinate Inline',
886 'Faster One',
887 'Fasthand',
888 'Fauna One',
889 'Federant',
890 'Federo',
891 'Felipa',
892 'Fenix',
893 'Finger Paint',
894 'Fira Mono',
895 'Fira Sans',
896 'Fjalla One',
897 'Fjord One',
898 'Flamenco',
899 'Flavors',
900 'Fondamento',
901 'Fontdiner Swanky',
902 'Forum',
903 'Francois One',
904 'Freckle Face',
905 'Fredericka the Great',
906 'Fredoka One',
907 'Freehand',
908 'Fresca',
909 'Frijole',
910 'Fruktur',
911 'Fugaz One',
912 'GFS Didot',
913 'GFS Neohellenic',
914 'Gabriela',
915 'Gafata',
916 'Galdeano',
917 'Galindo',
918 'Gentium Basic',
919 'Gentium Book Basic',
920 'Geo',
921 'Geostar',
922 'Geostar Fill',
923 'Germania One',
924 'Gidugu',
925 'Gilda Display',
926 'Give You Glory',
927 'Glass Antiqua',
928 'Glegoo',
929 'Gloria Hallelujah',
930 'Goblin One',
931 'Gochi Hand',
932 'Gorditas',
933 'Goudy Bookletter 1911',
934 'Graduate',
935 'Grand Hotel',
936 'Gravitas One',
937 'Great Vibes',
938 'Griffy',
939 'Gruppo',
940 'Gudea',
941 'Gurajada',
942 'Habibi',
943 'Halant',
944 'Hammersmith One',
945 'Hanalei',
946 'Hanalei Fill',
947 'Handlee',
948 'Hanuman',
949 'Happy Monkey',
950 'Headland One',
951 'Henny Penny',
952 'Herr Von Muellerhoff',
953 'Hind',
954 'Holtwood One SC',
955 'Homemade Apple',
956 'Homenaje',
957 'IM Fell DW Pica',
958 'IM Fell DW Pica SC',
959 'IM Fell Double Pica',
960 'IM Fell Double Pica SC',
961 'IM Fell English',
962 'IM Fell English SC',
963 'IM Fell French Canon',
964 'IM Fell French Canon SC',
965 'IM Fell Great Primer',
966 'IM Fell Great Primer SC',
967 'Iceberg',
968 'Iceland',
969 'Imprima',
970 'Inconsolata',
971 'Inder',
972 'Indie Flower',
973 'Inika',
974 'Irish Grover',
975 'Istok Web',
976 'Italiana',
977 'Italianno',
978 'Jacques Francois',
979 'Jacques Francois Shadow',
980 'Jaldi',
981 'Jim Nightshade',
982 'Jockey One',
983 'Jolly Lodger',
984 'Josefin Sans',
985 'Josefin Slab',
986 'Joti One',
987 'Judson',
988 'Julee',
989 'Julius Sans One',
990 'Junge',
991 'Jura',
992 'Just Another Hand',
993 'Just Me Again Down Here',
994 'Kalam',
995 'Kameron',
996 'Kantumruy',
997 'Karla',
998 'Karma',
999 'Kaushan Script',
1000 'Kavoon',
1001 'Kdam Thmor',
1002 'Keania One',
1003 'Kelly Slab',
1004 'Kenia',
1005 'Khand',
1006 'Khmer',
1007 'Khula',
1008 'Kite One',
1009 'Knewave',
1010 'Kotta One',
1011 'Koulen',
1012 'Kranky',
1013 'Kreon',
1014 'Kristi',
1015 'Krona One',
1016 'Kurale',
1017 'La Belle Aurore',
1018 'Laila',
1019 'Lakki Reddy',
1020 'Lancelot',
1021 'Lateef',
1022 'Lato',
1023 'League Script',
1024 'Leckerli One',
1025 'Ledger',
1026 'Lekton',
1027 'Lemon',
1028 'Libre Baskerville',
1029 'Life Savers',
1030 'Lilita One',
1031 'Lily Script One',
1032 'Limelight',
1033 'Linden Hill',
1034 'Lobster',
1035 'Lobster Two',
1036 'Londrina Outline',
1037 'Londrina Shadow',
1038 'Londrina Sketch',
1039 'Londrina Solid',
1040 'Lora',
1041 'Love Ya Like A Sister',
1042 'Loved by the King',
1043 'Lovers Quarrel',
1044 'Luckiest Guy',
1045 'Lusitana',
1046 'Lustria',
1047 'Macondo',
1048 'Macondo Swash Caps',
1049 'Magra',
1050 'Maiden Orange',
1051 'Mako',
1052 'Mallanna',
1053 'Mandali',
1054 'Marcellus',
1055 'Marcellus SC',
1056 'Marck Script',
1057 'Margarine',
1058 'Marko One',
1059 'Marmelad',
1060 'Martel',
1061 'Martel Sans',
1062 'Marvel',
1063 'Mate',
1064 'Mate SC',
1065 'Maven Pro',
1066 'McLaren',
1067 'Meddon',
1068 'MedievalSharp',
1069 'Medula One',
1070 'Megrim',
1071 'Meie Script',
1072 'Merienda',
1073 'Merienda One',
1074 'Merriweather',
1075 'Merriweather Sans',
1076 'Metal',
1077 'Metal Mania',
1078 'Metamorphous',
1079 'Metrophobic',
1080 'Michroma',
1081 'Milonga',
1082 'Miltonian',
1083 'Miltonian Tattoo',
1084 'Miniver',
1085 'Miss Fajardose',
1086 'Modak',
1087 'Modern Antiqua',
1088 'Molengo',
1089 'Monda',
1090 'Monofett',
1091 'Monoton',
1092 'Monsieur La Doulaise',
1093 'Montaga',
1094 'Montez',
1095 'Montserrat',
1096 'Montserrat Alternates',
1097 'Montserrat Subrayada',
1098 'Moul',
1099 'Moulpali',
1100 'Mountains of Christmas',
1101 'Mouse Memoirs',
1102 'Mr Bedfort',
1103 'Mr Dafoe',
1104 'Mr De Haviland',
1105 'Mrs Saint Delafield',
1106 'Mrs Sheppards',
1107 'Muli',
1108 'Mystery Quest',
1109 'NTR',
1110 'Neucha',
1111 'Neuton',
1112 'New Rocker',
1113 'News Cycle',
1114 'Niconne',
1115 'Nixie One',
1116 'Nobile',
1117 'Nokora',
1118 'Norican',
1119 'Nosifer',
1120 'Nothing You Could Do',
1121 'Noticia Text',
1122 'Noto Sans',
1123 'Noto Serif',
1124 'Nova Cut',
1125 'Nova Flat',
1126 'Nova Mono',
1127 'Nova Oval',
1128 'Nova Round',
1129 'Nova Script',
1130 'Nova Slim',
1131 'Nova Square',
1132 'Numans',
1133 'Nunito',
1134 'Odor Mean Chey',
1135 'Offside',
1136 'Old Standard TT',
1137 'Oldenburg',
1138 'Oleo Script',
1139 'Oleo Script Swash Caps',
1140 'Open Sans',
1141 'Oranienbaum',
1142 'Orbitron',
1143 'Oregano',
1144 'Orienta',
1145 'Original Surfer',
1146 'Oswald',
1147 'Over the Rainbow',
1148 'Overlock',
1149 'Overlock SC',
1150 'Ovo',
1151 'Oxygen',
1152 'Oxygen Mono',
1153 'PT Mono',
1154 'PT Sans',
1155 'PT Sans Caption',
1156 'PT Sans Narrow',
1157 'PT Serif',
1158 'PT Serif Caption',
1159 'Pacifico',
1160 'Palanquin',
1161 'Palanquin Dark',
1162 'Paprika',
1163 'Parisienne',
1164 'Passero One',
1165 'Passion One',
1166 'Pathway Gothic One',
1167 'Patrick Hand',
1168 'Patrick Hand SC',
1169 'Patua One',
1170 'Paytone One',
1171 'Peddana',
1172 'Peralta',
1173 'Permanent Marker',
1174 'Petit Formal Script',
1175 'Petrona',
1176 'Philosopher',
1177 'Piedra',
1178 'Pinyon Script',
1179 'Pirata One',
1180 'Plaster',
1181 'Play',
1182 'Playball',
1183 'Playfair Display',
1184 'Playfair Display SC',
1185 'Podkova',
1186 'Poiret One',
1187 'Poller One',
1188 'Poly',
1189 'Pompiere',
1190 'Pontano Sans',
1191 'Port Lligat Sans',
1192 'Port Lligat Slab',
1193 'Pragati Narrow',
1194 'Prata',
1195 'Preahvihear',
1196 'Press Start 2P',
1197 'Princess Sofia',
1198 'Prociono',
1199 'Prosto One',
1200 'Puritan',
1201 'Purple Purse',
1202 'Quando',
1203 'Quantico',
1204 'Quattrocento',
1205 'Quattrocento Sans',
1206 'Questrial',
1207 'Quicksand',
1208 'Quintessential',
1209 'Qwigley',
1210 'Racing Sans One',
1211 'Radley',
1212 'Rajdhani',
1213 'Raleway',
1214 'Raleway Dots',
1215 'Ramabhadra',
1216 'Ramaraja',
1217 'Rambla',
1218 'Rammetto One',
1219 'Ranchers',
1220 'Rancho',
1221 'Ranga',
1222 'Rationale',
1223 'Ravi Prakash',
1224 'Redressed',
1225 'Reenie Beanie',
1226 'Revalia',
1227 'Ribeye',
1228 'Ribeye Marrow',
1229 'Righteous',
1230 'Risque',
1231 'Roboto',
1232 'Roboto Condensed',
1233 'Roboto Slab',
1234 'Rochester',
1235 'Rock Salt',
1236 'Rokkitt',
1237 'Romanesco',
1238 'Ropa Sans',
1239 'Rosario',
1240 'Rosarivo',
1241 'Rouge Script',
1242 'Rozha One',
1243 'Rubik Mono One',
1244 'Rubik One',
1245 'Ruda',
1246 'Rufina',
1247 'Ruge Boogie',
1248 'Ruluko',
1249 'Rum Raisin',
1250 'Ruslan Display',
1251 'Russo One',
1252 'Ruthie',
1253 'Rye',
1254 'Sacramento',
1255 'Sail',
1256 'Salsa',
1257 'Sanchez',
1258 'Sancreek',
1259 'Sansita One',
1260 'Sarina',
1261 'Sarpanch',
1262 'Satisfy',
1263 'Scada',
1264 'Scheherazade',
1265 'Schoolbell',
1266 'Seaweed Script',
1267 'Sevillana',
1268 'Seymour One',
1269 'Shadows Into Light',
1270 'Shadows Into Light Two',
1271 'Shanti',
1272 'Share',
1273 'Share Tech',
1274 'Share Tech Mono',
1275 'Shojumaru',
1276 'Short Stack',
1277 'Siemreap',
1278 'Sigmar One',
1279 'Signika',
1280 'Signika Negative',
1281 'Simonetta',
1282 'Sintony',
1283 'Sirin Stencil',
1284 'Six Caps',
1285 'Skranji',
1286 'Slabo 13px',
1287 'Slabo 27px',
1288 'Slackey',
1289 'Smokum',
1290 'Smythe',
1291 'Sniglet',
1292 'Snippet',
1293 'Snowburst One',
1294 'Sofadi One',
1295 'Sofia',
1296 'Sonsie One',
1297 'Sorts Mill Goudy',
1298 'Source Code Pro',
1299 'Source Sans Pro',
1300 'Source Serif Pro',
1301 'Special Elite',
1302 'Spicy Rice',
1303 'Spinnaker',
1304 'Spirax',
1305 'Squada One',
1306 'Sree Krushnadevaraya',
1307 'Stalemate',
1308 'Stalinist One',
1309 'Stardos Stencil',
1310 'Stint Ultra Condensed',
1311 'Stint Ultra Expanded',
1312 'Stoke',
1313 'Strait',
1314 'Sue Ellen Francisco',
1315 'Sumana',
1316 'Sunshiney',
1317 'Supermercado One',
1318 'Suranna',
1319 'Suravaram',
1320 'Suwannaphum',
1321 'Swanky and Moo Moo',
1322 'Syncopate',
1323 'Tangerine',
1324 'Taprom',
1325 'Tauri',
1326 'Teko',
1327 'Telex',
1328 'Tenali Ramakrishna',
1329 'Tenor Sans',
1330 'Text Me One',
1331 'The Girl Next Door',
1332 'Tienne',
1333 'Timmana',
1334 'Tinos',
1335 'Titan One',
1336 'Titillium Web',
1337 'Trade Winds',
1338 'Trocchi',
1339 'Trochut',
1340 'Trykker',
1341 'Tulpen One',
1342 'Ubuntu',
1343 'Ubuntu Condensed',
1344 'Ubuntu Mono',
1345 'Ultra',
1346 'Uncial Antiqua',
1347 'Underdog',
1348 'Unica One',
1349 'UnifrakturMaguntia',
1350 'Unkempt',
1351 'Unlock',
1352 'Unna',
1353 'VT323',
1354 'Vampiro One',
1355 'Varela',
1356 'Varela Round',
1357 'Vast Shadow',
1358 'Vesper Libre',
1359 'Vibur',
1360 'Vidaloka',
1361 'Viga',
1362 'Voces',
1363 'Volkhov',
1364 'Vollkorn',
1365 'Voltaire',
1366 'Waiting for the Sunrise',
1367 'Wallpoet',
1368 'Walter Turncoat',
1369 'Warnes',
1370 'Wellfleet',
1371 'Wendy One',
1372 'Wire One',
1373 'Yanone Kaffeesatz',
1374 'Yellowtail',
1375 'Yeseva One',
1376 'Yesteryear',
1377 'Zeyada',
1378 );
1379 }
1380
1381 public static function getStandardFontsList() {
1382 return array(
1383 'Georgia',
1384 'Palatino Linotype',
1385 'Times New Roman',
1386 'Arial',
1387 'Helvetica',
1388 'Arial Black',
1389 'Gadget',
1390 'Comic Sans MS',
1391 'Impact',
1392 'Charcoal',
1393 'Lucida Sans Unicode',
1394 'Lucida Grande',
1395 'Tahoma',
1396 'Geneva',
1397 'Trebuchet MS',
1398 'Verdana',
1399 'Geneva',
1400 'Courier New',
1401 'Courier',
1402 'Lucida Console',
1403 'Monaco',
1404 );
1405 }
1406
1407 public static function getAllFontsList() {
1408 if (empty(self::$fontsList)) {
1409 $fontsList = array_merge(self::getFontsList(), self::getStandardFontsList());
1410 natsort( $fontsList );
1411 array_unshift( $fontsList, '');
1412 $options = array();
1413 foreach ( $fontsList as $font ) {
1414 $options[ $font ] = $font;
1415 }
1416 self::$fontsList = $options;
1417 }
1418 return self::$fontsList;
1419 }
1420 public static function getFontStyles() {
1421 return array( '' => '', 'n' => 'normal', 'b' => 'bold', 'i' => 'italic', 'bi' => 'bold + italic' );
1422 }
1423 public static function getBorderStyles() {
1424 return array( '' => '', 'solid' => 'solid', 'dashed' => 'dashed', 'dotted' => 'dotted', 'double' => 'double' );
1425 }
1426 }
1427