PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.1.6.9
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.1.6.9
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
learnpress / inc / admin / views / meta-boxes / lp-meta-box-functions.php

lp-meta-box-functions.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.1.6.9, at inc/admin/views/meta-boxes/lp-meta-box-functions.php

589 lines 19.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Output a text input box.
4 *
5 * @param array $field
6 */
7 function lp_meta_box_text_input_field( $field ) {
8 global $thepostid, $post;
9
10 $thepostid = empty( $thepostid ) ? $post->ID : $thepostid;
11 $field['placeholder'] = esc_attr( $field['placeholder'] ?? '' );
12 $field['class'] = esc_attr( $field['class'] ?? '' );
13 $field['style'] = esc_attr( $field['style'] ?? '' );
14 $wrapper_class = esc_attr( $field['wrapper_class'] ?? '' );
15
16 /**
17 * If you want to set default value for input text
18 * You must us hook default_{$meta_type}_metadata | Read more get_metadata_default() function
19 */
20 $value_exists = LP_Database::getInstance()->check_key_postmeta_exists( $thepostid, $field['id'] );
21 $value = get_post_meta( $thepostid, $field['id'], true );
22 $field['value'] = $value_exists ? $value : ( $field['default'] ?? '' );
23 $field['id'] = esc_attr( $field['id'] ?? '' );
24 $field['type_input'] = esc_attr( $field['type_input'] ?? 'text' );
25 $field['desc_tip'] = esc_attr( $field['desc_tip'] ?? '' );
26
27 // Custom attribute handling
28 $custom_attributes = array();
29
30 if ( ! empty( $field['custom_attributes'] ) && is_array( $field['custom_attributes'] ) ) {
31 foreach ( $field['custom_attributes'] as $attribute => $custom_attribute ) {
32 $custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $custom_attribute ) . '"';
33 }
34 }
35
36 $custom_attributes_str = implode( ' ', $custom_attributes );
37 ?>
38
39 <div class="form-field <?php echo $field['id'] . '_field ' . $wrapper_class; ?>">
40 <label for="<?php echo $field['id']; ?>"><?php echo wp_kses_post( $field['label'] ); ?></label>
41 <input type="<?php echo $field['type_input']; ?>"
42 class="<?php echo $field['class']; ?>"
43 style="<?php echo $field['style']; ?>"
44 name="<?php echo $field['id']; ?>"
45 id="<?php echo $field['id']; ?>"
46 value="<?php echo $field['value']; ?>"
47 placeholder="<?php echo $field['placeholder']; ?>" <?php echo $custom_attributes_str; ?> />
48
49 <?php
50 if ( ! empty( $field['description'] ) ) {
51 echo '<p class="description">';
52 echo '<span>' . wp_kses_post( $field['description'] ) . '</span>';
53
54 if ( ! empty( $field['desc_tip'] ) ) {
55 learn_press_quick_tip( $field['desc_tip'] );
56 }
57 echo '</p>';
58 }
59 ?>
60 </div>
61 <?php
62 }
63
64 /**
65 * Output a textarea input box.
66 *
67 * @param array $field
68 */
69 function lp_meta_box_textarea_field( $field ) {
70 global $thepostid, $post;
71
72 $thepostid = empty( $thepostid ) ? $post->ID : $thepostid;
73 $field['id'] = esc_attr( $field['id'] ?? '' );
74 $field['placeholder'] = esc_attr( $field['placeholder'] ?? '' );
75 $field['class'] = esc_attr( $field['class'] ?? 'short' );
76 $field['style'] = esc_attr( $field['style'] ?? '' );
77 $value_exists = LP_Database::getInstance()->check_key_postmeta_exists( $thepostid, $field['id'] );
78 $value = get_post_meta( $thepostid, $field['id'], true );
79 $field['value'] = esc_textarea( $value_exists ? $value : ( $field['default'] ?? '' ) );
80 $field['desc_tip'] = esc_attr( $field['desc_tip'] ?? '' );
81 $field['name'] = esc_attr( $field['name'] ?? $field['id'] );
82
83 // Custom attribute handling
84 $custom_attributes = array();
85 if ( ! empty( $field['custom_attributes'] ) && is_array( $field['custom_attributes'] ) ) {
86 foreach ( $field['custom_attributes'] as $attribute => $custom_attribute ) {
87 $custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $custom_attribute ) . '"';
88 }
89 }
90
91 $custom_attributes_str = implode( ' ', $custom_attributes );
92 ?>
93
94 <p class="form-field <?php echo $field['id'] . '_field '; ?>">
95 <label for="<?php echo $field['id']; ?>>"><?php echo wp_kses_post( $field['label'] ); ?></label>
96 <textarea class="<?php echo $field['class']; ?>"
97 style="<?php echo $field['style']; ?>"
98 name="<?php echo $field['name']; ?>"
99 id="<?php $field['id']; ?>"
100 placeholder="<?php echo $field['placeholder']; ?>"
101 rows="5" <?php echo $custom_attributes_str; ?>><?php echo $field['value']; ?></textarea>
102 <?php
103 if ( ! empty( $field['description'] ) ) {
104 echo '<span class="description">' . wp_kses_post( $field['description'] ) . '</span>';
105
106 if ( ! empty( $field['desc_tip'] ) ) {
107 learn_press_quick_tip( $field['desc_tip'] );
108 }
109 }
110 ?>
111 </p>
112 <?php
113 }
114
115 /**
116 * Output a checkbox input box.
117 *
118 * @param array $field
119 */
120 function lp_meta_box_checkbox_field( $field ) {
121 global $thepostid, $post;
122
123 $thepostid = empty( $thepostid ) ? $post->ID : $thepostid;
124 $field['id'] = esc_attr( $field['id'] ?? '' );
125 $field['class'] = esc_attr( $field['class'] ?? '' );
126 $field['style'] = esc_attr( $field['style'] ?? '' );
127 $wrapper_class = esc_attr( $field['wrapper_class'] ?? '' );
128 $name = ! empty( $field['name'] ) ? esc_attr( $field['name'] ) : esc_attr( $field['id'] );
129
130 $value_db = get_post_meta( $thepostid, $field['id'], true );
131
132 $checked = '';
133 if ( 'yes' === $value_db ) {
134 $checked = 'checked="checked"';
135 }
136
137 // Custom attribute handling
138 $custom_attributes = array();
139 if ( ! empty( $field['custom_attributes'] ) && is_array( $field['custom_attributes'] ) ) {
140 foreach ( $field['custom_attributes'] as $attribute => $custom_attribute ) {
141 $custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $custom_attribute ) . '"';
142 }
143 }
144
145 $custom_attributes_str = implode( ' ', $custom_attributes );
146 ?>
147
148 <div class="form-field <?php echo $field['id'] . '_field'; ?>" <?php echo $wrapper_class; ?>>
149 <label for="<?php echo $field['id']; ?>"><?php echo wp_kses_post( $field['label'] ); ?></label>
150
151 <input type="checkbox"
152 class="<?php echo $field['class']; ?>"
153 style="<?php echo $field['style']; ?>"
154 name="<?php echo $name; ?>"
155 id="<?php echo $field['id']; ?>"
156 <?php echo $checked; ?>
157
158 <?php echo $custom_attributes_str; ?> />
159
160 <?php
161 if ( ! empty( $field['description'] ) ) {
162 echo '<span class="description">' . wp_kses_post( $field['description'] ) . '</span>';
163
164 if ( ! empty( $field['desc_tip'] ) ) {
165 learn_press_quick_tip( $field['desc_tip'] );
166 }
167 }
168 ?>
169 </div>
170 <?php
171 }
172
173 /**
174 * Output a select input box.
175 *
176 * @param array $field Data about the field to render.
177 */
178 function lp_meta_box_select_field( $field = array() ) {
179 global $thepostid, $post;
180
181 $thepostid = empty( $thepostid ) ? $post->ID : $thepostid;
182 $default = ( ! get_post_meta(
183 $thepostid,
184 $field['id'],
185 true
186 ) && isset( $field['default'] ) ) ? $field['default'] : get_post_meta(
187 $thepostid,
188 $field['id'],
189 true
190 );
191
192 $field = wp_parse_args(
193 $field,
194 array(
195 'class' => 'select',
196 'style' => '',
197 'wrapper_class' => '', // Use "lp-select-2" for select2.
198 'value' => isset( $field['value'] ) ? $field['value'] : $default,
199 'name' => $field['id'],
200 'desc_tip' => false,
201 'multiple' => false,
202 'custom_attributes' => array(),
203 )
204 );
205
206 $label_attributes = array(
207 'for' => $field['id'],
208 );
209
210 $field_attributes = (array) $field['custom_attributes'];
211 $field_attributes['style'] = $field['style'];
212 $field_attributes['id'] = $field['id'];
213 $field_attributes['name'] = $field['multiple'] ? $field['name'] . '[]' : $field['name'];
214 $field_attributes['class'] = $field['class'];
215
216 if ( $field['multiple'] ) {
217 $field['wrapper_class'] = 'lp-select-2';
218 $field_attributes['multiple'] = true;
219 }
220
221 $tooltip = ! empty( $field['description'] ) && false !== $field['desc_tip'] ? $field['description'] : '';
222 $description = ! empty( $field['description'] ) && false === $field['desc_tip'] ? $field['description'] : '';
223 ?>
224
225 <p class="form-field <?php echo esc_attr( $field['id'] ) . '_field ' . esc_attr( $field['wrapper_class'] ); ?>">
226 <label for="<?php echo esc_attr( $field['id'] ); ?>"><?php echo wp_kses_post( $field['label'] ); ?></label>
227 <select <?php echo lp_implode_html_attributes( $field_attributes ); ?>>
228 <?php
229 foreach ( $field['options'] as $key => $value ) {
230 echo '<option value="' . esc_attr( $key ) . '"' . ( is_array( $field['value'] ) ? selected( in_array( (string) $key, $field['value'], true ), true ) : selected( $key, $field['value'], false ) ) . '>' . esc_html( $value ) . '</option>';
231 }
232 ?>
233 </select>
234 <?php
235 if ( ! empty( $field['description'] ) ) {
236 echo '<span class="description">' . wp_kses_post( $field['description'] ) . '</span>';
237
238 if ( ! empty( $field['desc_tip'] ) ) {
239 learn_press_quick_tip( $field['desc_tip'] );
240 }
241 }
242 ?>
243 </p>
244 <?php
245 }
246
247 /**
248 * Output a radio input box.
249 *
250 * @param array $field
251 */
252 function lp_meta_box_radio_field( $field ) {
253 global $thepostid, $post;
254
255 $thepostid = empty( $thepostid ) ? $post->ID : $thepostid;
256 $field['class'] = isset( $field['class'] ) ? $field['class'] : 'select';
257 $field['style'] = isset( $field['style'] ) ? $field['style'] : '';
258 $field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
259 $field['default'] = ( ! get_post_meta(
260 $thepostid,
261 $field['id'],
262 true
263 ) && isset( $field['default'] ) ) ? $field['default'] : get_post_meta(
264 $thepostid,
265 $field['id'],
266 true
267 );
268 $field['value'] = isset( $field['value'] ) ? $field['value'] : $field['default'];
269 $field['name'] = isset( $field['name'] ) ? $field['name'] : $field['id'];
270 $field['desc_tip'] = isset( $field['desc_tip'] ) ? $field['desc_tip'] : false;
271
272 echo '<fieldset class="form-field ' . esc_attr( $field['id'] ) . '_field ' . esc_attr( $field['wrapper_class'] ) . '"><h4>' . wp_kses_post( $field['label'] ) . '</h4>';
273
274 if ( ! empty( $field['description'] ) && false !== $field['desc_tip'] ) {
275 learn_press_quick_tip( $field['description'] );
276 }
277
278 echo '<ul class="lp-radios-field-meta-box">';
279
280 foreach ( $field['options'] as $key => $value ) {
281 echo '<li><label><input
282 name="' . esc_attr( $field['name'] ) . '"
283 value="' . esc_attr( $key ) . '"
284 type="radio"
285 class="' . esc_attr( $field['class'] ) . '"
286 style="' . esc_attr( $field['style'] ) . '"
287 ' . checked( esc_attr( $field['value'] ), esc_attr( $key ), false ) . '
288 /> ' . ( $value ) . '</label>
289 </li>';
290 }
291 echo '</ul>';
292
293 if ( ! empty( $field['description'] ) && false === $field['desc_tip'] ) {
294 echo '<span class="description">' . wp_kses_post( $field['description'] ) . '</span>';
295 }
296
297 echo '</fieldset>';
298 }
299
300 function lp_meta_box_file_input_field( $field ) {
301 global $thepostid, $post;
302
303 $thepostid = empty( $thepostid ) ? $post->ID : $thepostid;
304 $field['class'] = isset( $field['class'] ) ? $field['class'] : 'short';
305 $field['style'] = isset( $field['style'] ) ? $field['style'] : '';
306 $field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
307 $field['default'] = ( ! get_post_meta(
308 $thepostid,
309 $field['id'],
310 true
311 ) && isset( $field['default'] ) ) ? $field['default'] : get_post_meta(
312 $thepostid,
313 $field['id'],
314 true
315 );
316 $field['value'] = isset( $field['value'] ) ? $field['value'] : $field['default'];
317 $field['name'] = isset( $field['name'] ) ? $field['name'] : $field['id'];
318 $field['mime_type'] = isset( $field['mime_type'] ) ? implode( ',', $field['mime_type'] ) : '';
319 $field['multil'] = ( isset( $field['multil'] ) && $field['multil'] ) ? true : false;
320 $field['desc_tip'] = isset( $field['desc_tip'] ) ? $field['desc_tip'] : false;
321
322 // Custom attribute handling
323 $custom_attributes = array();
324
325 if ( ! empty( $field['custom_attributes'] ) && is_array( $field['custom_attributes'] ) ) {
326 foreach ( $field['custom_attributes'] as $attribute => $custom_attribute ) {
327 $custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $custom_attribute ) . '"';
328 }
329 }
330
331 echo '<div class="form-field ' . esc_attr( $field['id'] ) . '_field ' . esc_attr( $field['wrapper_class'] ) . '">
332 <label for="' . esc_attr( $field['id'] ) . '">' . wp_kses_post( $field['label'] ) . '</label>';
333
334 echo '<div id="' . esc_attr( $field['id'] ) . '" class="lp-meta-box__file ' . esc_attr( $field['class'] ) . '" data-mime="' . $field['mime_type'] . '" data-multil="' . $field['multil'] . '" style="' . esc_attr( $field['style'] ) . '" ' . implode(
335 ' ',
336 $custom_attributes
337 ) . '>';
338 echo '<ul class="lp-meta-box__file_list">';
339
340 if ( ! empty( $field['value'] ) ) {
341 foreach ( (array) $field['value'] as $attachment_id ) {
342 $url = wp_get_attachment_url( $attachment_id );
343
344 if ( $url ) {
345 $check_file = wp_check_filetype( $url );
346
347 echo '<li class="lp-meta-box__file_list-item image" data-attachment_id="' . $attachment_id . '">';
348
349 if ( in_array( $check_file['ext'], array( 'jpg', 'png', 'gif', 'bmp', 'tif', 'jpeg' ), true ) ) {
350 echo wp_get_attachment_image( $attachment_id, 'thumbnail' );
351 } else {
352 echo '<img class="is_file" src="' . wp_mime_type_icon( $check_file['type'] ) . '" />';
353 echo '<span>' . wp_basename( get_attached_file( $attachment_id ) ) . '</span>';
354 }
355 echo '<ul class="actions"><li><a href="#" class="delete"></a></li></ul>';
356 echo '</li>';
357 }
358 }
359 }
360
361 echo '</ul>';
362 echo '<input class="lp-meta-box__file_input" type="hidden" name="' . esc_attr( $field['id'] ) . '" value="' . esc_attr(
363 ( ! empty( $field['value'] ) && is_array( $field['value'] ) ) ? implode(
364 ',',
365 $field['value']
366 ) : $field['value']
367 ) . '" />';
368 echo '<p>';
369 echo '<a href="#" class="button btn-upload">' . esc_html__( '+ Add media', 'learnpress' ) . '</a>';
370 if ( ! empty( $field['description'] ) && false !== $field['desc_tip'] ) {
371 learn_press_quick_tip( $field['description'] );
372 }
373 echo '</p>';
374
375 if ( ! empty( $field['description'] ) && false === $field['desc_tip'] ) {
376 echo '<span class="description">' . wp_kses_post( $field['description'] ) . '</span>';
377 }
378 echo '</div>';
379 echo '</div>';
380 }
381
382 /**
383 * Output a duration input box.
384 *
385 * @param array $field
386 */
387 function lp_meta_box_duration_field( $field ) {
388 global $thepostid, $post;
389
390 $thepostid = empty( $thepostid ) ? $post->ID : $thepostid;
391 $field['placeholder'] = isset( $field['placeholder'] ) ? $field['placeholder'] : '';
392 $field['class'] = isset( $field['class'] ) ? $field['class'] : 'short';
393 $field['style'] = isset( $field['style'] ) ? $field['style'] : '';
394 $field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
395 $field['default'] = ( ! get_post_meta(
396 $thepostid,
397 $field['id'],
398 true
399 ) && isset( $field['default'] ) ) ? $field['default'] : get_post_meta(
400 $thepostid,
401 $field['id'],
402 true
403 );
404 $field['value'] = isset( $field['value'] ) ? $field['value'] : $field['default'];
405 $field['name'] = isset( $field['name'] ) ? $field['name'] : $field['id'];
406 $data_type = empty( $field['data_type'] ) ? '' : $field['data_type'];
407 $duration = learn_press_get_course_duration_support();
408
409 $duration_keys = array_keys( $duration );
410 $default_time = ! empty( $field['default_time'] ) ? $field['default_time'] : end( $duration_keys );
411
412 if ( preg_match_all( '!([0-9]+)\s*(' . join( '|', $duration_keys ) . ')?!', $field['value'], $matches ) ) {
413 $a1 = $matches[1][0];
414 $a2 = in_array( $matches[2][0], $duration_keys ) ? $matches[2][0] : $default_time;
415 } else {
416 $a1 = absint( $field['value'] );
417 $a2 = $default_time;
418 }
419
420 // Custom attribute handling
421 $custom_attributes = array();
422
423 if ( ! empty( $field['custom_attributes'] ) && is_array( $field['custom_attributes'] ) ) {
424 foreach ( $field['custom_attributes'] as $attribute => $custom_attribute ) {
425 $custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $custom_attribute ) . '"';
426 }
427 }
428
429 $html_option = '';
430 foreach ( $duration as $k => $v ) {
431 $html_option .= sprintf( '<option value="%s" %s>%s</option>', $k, selected( $k, $a2, false ), $v );
432 }
433
434 echo '<p class="lp-meta-box__duration form-field ' . esc_attr( $field['id'] ) . '_field ' . esc_attr( $field['wrapper_class'] ) . '">
435 <label for="' . esc_attr( $field['id'] ) . '">' . wp_kses_post( $field['label'] ) . '</label>';
436
437 echo '<input type="number" class="' . esc_attr( $field['class'] ) . '" style="' . esc_attr( $field['style'] ) . '" name="' . esc_attr( $field['name'] ) . '[]" id="' . esc_attr( $field['id'] ) . '" value="' . esc_attr( $a1 ) . '" placeholder="' . esc_attr( $field['placeholder'] ) . '" ' . implode(
438 ' ',
439 $custom_attributes
440 ) . ' /> ';
441
442 echo '<select name="' . esc_attr( $field['name'] ) . '[]" class="lp-meta-box__duration-select">' . $html_option . '</select>';
443
444 if ( ! empty( $field['description'] ) ) {
445 echo '<span class="description">' . wp_kses_post( $field['description'] ) . '</span>';
446
447 if ( ! empty( $field['desc_tip'] ) ) {
448 learn_press_quick_tip( $field['desc_tip'] );
449 }
450 }
451
452 echo '</p>';
453 }
454
455 /**
456 * Use for Type: custom_fields in LP4.
457 *
458 * @param [type] $field get ID, options....
459 * @param [type] $values get_option() value
460 * @param [type] $key
461 *
462 * @return void
463 */
464 function lp_metabox_custom_fields( $field, $values, $key ) {
465 ?>
466 <tr>
467 <td class="sort">
468 <input class="count" type="hidden" value="<?php echo $key; ?>" name="<?php echo esc_attr( $field['id'] ) . '[' . $key . ']' . '[sort]'; ?>">
469 <input type="hidden" value="<?php echo ! empty( $values['id'] ) ? $values['id'] : wp_rand( 1, 10000 ) . $key; ?>" name="<?php echo esc_attr( $field['id'] ) . '[' . $key . ']' . '[id]'; ?>">
470 </td>
471 <?php
472 if ( $field['options'] ) {
473 foreach ( $field['options'] as $cfk => $val ) {
474 $name = $field['id'] . '[' . $key . ']' . '[' . $cfk . ']';
475
476 switch ( $val['type'] ) {
477 case 'text':
478 case 'password':
479 case 'datetime':
480 case 'datetime-local':
481 case 'date':
482 case 'month':
483 case 'time':
484 case 'week':
485 case 'number':
486 case 'email':
487 case 'url':
488 case 'tel':
489 ?>
490 <td>
491 <input name="<?php echo esc_attr( $name ); ?>" type="<?php echo $val['type']; ?>"
492 class="input-text"
493 placeholder="<?php echo isset( $val['placeholder'] ) ? esc_attr( $val['placeholder'] ) : ''; ?>"
494 value="<?php echo ! empty( $values[ $cfk ] ) ? esc_attr( $values[ $cfk ] ) : ''; ?>">
495 </td>
496 <?php
497 break;
498
499 case 'select':
500 ?>
501 <td>
502 <select name="<?php echo esc_attr( $name ); ?>">
503 <?php
504 if ( isset( $val['options'] ) ) {
505 foreach ( $val['options'] as $cfks => $cfselect ) {
506 ?>
507 <option
508 value="<?php echo esc_attr( $cfks ); ?>"
509 <?php
510 echo ! empty( $values[ $cfk ] ) ? selected(
511 $values[ $cfk ],
512 (string) $cfks
513 ) : '';
514 ?>
515 ><?php echo $cfselect; ?></option>
516 <?php
517 }
518 }
519 ?>
520 </select>
521 </td>
522 <?php
523 break;
524
525 case 'checkbox':
526 ?>
527 <td>
528 <input name="<?php echo esc_attr( $name ); ?>" type="checkbox" name="" value="1" <?php echo ! empty( $values[ $cfk ] ) ? checked( $values[ $cfk ], 'yes' ) : ''; ?>>
529 </td>
530 <?php
531 break;
532 }
533 }
534 }
535 ?>
536 <td width="2%"><a href="#" class="delete"></a></td>
537 </tr>
538 <?php
539 }
540
541 function lp_implode_html_attributes( $raw_attributes ) {
542 $attributes = array();
543 foreach ( $raw_attributes as $name => $value ) {
544 $attributes[] = esc_attr( $name ) . '="' . esc_attr( $value ) . '"';
545 }
546
547 return implode( ' ', $attributes );
548 }
549
550 function lp_meta_box_output( $metaboxes = array() ) {
551 if ( ! empty( $metaboxes ) ) {
552 foreach ( $metaboxes as $id => $field ) {
553 $field['id'] = $id;
554
555 switch ( $field['type'] ) {
556 case 'text':
557 case 'number':
558 case 'url':
559 lp_meta_box_text_input_field( $field );
560 break;
561
562 case 'textarea':
563 lp_meta_box_textarea_field( $field );
564 break;
565
566 case 'checkbox':
567 lp_meta_box_checkbox_field( $field );
568 break;
569
570 case 'duration':
571 lp_meta_box_duration_field( $field );
572 break;
573
574 case 'select':
575 lp_meta_box_select_field( $field );
576 break;
577
578 case 'radio':
579 lp_meta_box_radio_field( $field );
580 break;
581
582 case 'file':
583 lp_meta_box_file_input_field( $field );
584 break;
585 }
586 }
587 }
588 }
589