/** * get the layout for theme panel * layout framework * @param $type = type of layout that will inserted into layout structure * @param $id = unique id, for layout indetifier * * @return html structure */ function wipfr_get_layout_for_setting($type = "fullwidth", $id, $parentID = 0, $forPage = false) { switch ($type) { case 'fullwidth': return wipfr_fullwidth_module($id, '', $forPage); break; case 'sidebar_content': return wipfr_sidebarcontent_module('sidebar_content', $id, '', $forPage); break; case 'content_sidebar': return wipfr_sidebarcontent_module('content_sidebar', $id, '', $forPage); break; case '4col': return wipfr_columns_module(4, $id, $parentID, '4col'); break; case '3col': return wipfr_columns_module(3, $id, $parentID, '3col'); break; case '2col': return wipfr_columns_module(2, $id, $parentID, '2col'); break; case '1_2_3col': $colConcept = array('1/3', '2/3'); return wipfr_mix_columns_module($colConcept, $id, $parentID, '1_2_3col'); break; case '2_1_3col': $colConcept = array('2/3', '1/3'); return wipfr_mix_columns_module($colConcept, $id, $parentID, '2_1_3col'); break; case '1_1_2_4col': $colConcept = array('1/4', '1/4', '2/4'); return wipfr_mix_columns_module($colConcept, $id, $parentID, '1_1_2_4col'); break; case '1_2_1_4col': $colConcept = array('1/4', '2/4', '1/4'); return wipfr_mix_columns_module($colConcept, $id, $parentID, '1_2_1_4col'); break; case '2_1_1_4col': $colConcept = array('2/4', '1/4', '1/4'); return wipfr_mix_columns_module($colConcept, $id, $parentID, '2_1_1_4col'); break; case '1_3_4col': $colConcept = array('1/4', '3/4'); return wipfr_mix_columns_module($colConcept, $id, $parentID, '1_3_4col'); break; case '3_1_4col': $colConcept = array('3/4', '1/4'); return wipfr_mix_columns_module($colConcept, $id, $parentID, '3_1_4col'); break; case 'divider1': case 'divider2': return wipfr_divider_layout($id, $parentID, $type); break; case 'paragraph-text': return wipfr_full_paragraph_layout($id, $parentID); break; case 'tagline': return wipfr_full_tagline_layout($id, $parentID); break; case 'taglinebutton': return wipfr_full_taglinebutton_layout($id, $parentID); break; case 'single-page': return wipfr_get_singlepage_layout($id, $parentID); break; case 'single-page-content': return wipfr_get_singlepagecontent_layout($id, $parentID); break; case 'blog-lists': return wipfr_get_bloglists_layout($id, $parentID); break; case 'product-lists': return wipfr_get_product_layout($id, $parentID); break; case 'portfolio-lists': return wipfr_get_portfolio_layout($id, $parentID); break; } }
function _print_current_layout_db($id) { $parentStruct = get_post_meta($id, '_wipfr_page_parent_layout', true); $throw = ""; if (!empty($parentStruct) && is_array($parentStruct)) { $throw = '<ul id="wip-layout-item-lists" >' . "\n"; foreach ($parentStruct as $pid => $key) { if (isset($key['type'])) { $pL = $key['type']; switch ($pL) { case 'fullwidth': $throw .= wipfr_fullwidth_module($pid, wip_page_manager::_get_current_content_db($id, $pid), true); break; case 'sidebar_content': $throw .= wipfr_sidebarcontent_module('sidebar_content', $pid, wip_page_manager::_get_current_content_db($id, $pid), true); break; case 'content_sidebar': $throw .= wipfr_sidebarcontent_module('content_sidebar', $pid, wip_page_manager::_get_current_content_db($id, $pid), true); break; } } } $throw .= '</ul>' . "\n"; } return $throw; }