function gdlr_lms_print_meta_box($settings) { if ($settings['type'] == 'title') { if (!empty($settings['class']) && $settings['class'] == 'with-space') { echo '<div class="clear" style="height:30px;" ></div>'; } echo '<h3>' . $settings['title'] . '</h3>'; return; } $settings['wrapper-class'] = empty($settings['wrapper-class']) ? '' : $settings['wrapper-class']; echo '<div class="gdlr-lms-meta-option ' . $settings['wrapper-class'] . ' type-' . $settings['type'] . '">'; if (!empty($settings['title'])) { echo '<span class="gdlr-lms-meta-title"> ' . $settings['title'] . ' : </span>'; } switch ($settings['type']) { case 'upload': gdlr_lms_print_upload_box($settings); break; case 'text': gdlr_lms_print_text_input($settings); break; case 'textarea': gdlr_lms_print_textarea($settings); break; case 'combobox': gdlr_lms_print_combobox($settings); break; case 'checkbox': gdlr_lms_print_checkbox($settings); break; case 'datepicker': gdlr_lms_print_datepicker($settings); break; case 'wysiwyg': gdlr_lms_print_wysiwyg($settings); break; case 'question': gdlr_lms_print_question($settings); break; } if (!empty($settings['description'])) { echo '<span class="gdlr-lms-meta-description"> ' . $settings['description'] . '</span>'; } echo '</div>'; }
function gdlr_lms_print_meta_box($settings) { $settings['wrapper-class'] = empty($settings['wrapper-class']) ? '' : $settings['wrapper-class']; echo '<div class="gdlr-lms-meta-option ' . $settings['wrapper-class'] . '">'; if (!empty($settings['title'])) { echo '<span class="gdlr-lms-meta-title"> ' . $settings['title'] . ' : </span>'; } switch ($settings['type']) { case 'description': gdlr_lms_print_description($settings); break; case 'button': gdlr_lms_print_button($settings); break; case 'text': gdlr_lms_print_text_input($settings); break; case 'textarea': gdlr_lms_print_textarea($settings); break; case 'upload': gdlr_lms_print_upload_box($settings); break; case 'combobox': gdlr_lms_print_combobox($settings); break; case 'checkbox': gdlr_lms_print_checkbox($settings); break; case 'datepicker': gdlr_lms_print_datepicker($settings); break; case 'wysiwyg': gdlr_lms_print_wysiwyg($settings); break; case 'question': gdlr_lms_print_question($settings); break; } if (!empty($settings['description'])) { echo '<span class="gdlr-lms-meta-description"> ' . $settings['description'] . '</span>'; } echo '</div>'; }