function print_meta($meta_box) { if (empty($meta_box['default'])) { $meta_box['default'] = ''; } if (empty($meta_box['meta_body'])) { $meta_box['meta_body'] = ''; } switch ($meta_box['type']) { case "open": print_meta_open_div($meta_box); break; case "close": print_meta_close_div($meta_box); break; case "header": print_meta_header($meta_box); break; case "text": print_meta_text($meta_box); break; case "description": print_description($meta_box); break; case "inputtext": print_meta_input_text($meta_box); break; case "upload": print_meta_upload($meta_box); break; case "media-upload": print_meta_media_upload($meta_box); break; case "textarea": print_meta_input_textarea($meta_box); break; case "checkbox": print_meta_input_checkbox($meta_box); break; case "combobox": print_meta_input_combobox($meta_box); break; case "radioenabled": print_meta_input_radioenabled($meta_box); break; case "radioimage": print_meta_input_radioimage($meta_box); break; case "imagepicker": print_image_picker($meta_box); break; case "datepicker": print_date_picker($meta_box); break; } }
function print_page_elements($args, $xml_val, $item_type) { extract($args); $head_type = $item_type; if (empty($xml_val)) { $head_size = ''; $head_name = array('item' => $item, 'size' => $size, 'itemname' => '', 'sizename' => ''); } else { $head_size = find_xml_value($xml_val, 'size'); $head_name = array('item' => $item, 'size' => $size, 'itemname' => $item . '[]', 'sizename' => $size . '[]'); } print_page_item_identical($head_name, $head_size, $head_type); ?> <div class="page-element-edit-box" id="page-element-edit-box"> <?php foreach ($name[$item_type] as $input_key => $input_value) { if ($input_key == 'slider-item') { $slider_value = find_xml_node($xml_val, 'slider-item'); print_image_picker(array('name' => $input_value, 'value' => $slider_value)); } else { if ($input_key == 'tab-item') { print_box_tab($input_value, find_xml_node($xml_val, 'tab-item')); } else { $input_value['value'] = find_xml_value($xml_val, $input_key); $input_value['name'] = $input_value['name'] . '[]'; print_meta($input_value); } } if ($input_key != 'open' && $input_key != 'close') { echo empty($input_value['hr']) ? '<hr class="separator mt20">' : ''; } } ?> </div> </div> <?php }