0)?$id=0:NULL; $new_sidebar = $GLOBALS['new_sidebar']; $layout_info[$id] = array_merge($layout_info[$id], $new_sidebar); } $count_horizontal=0; if(isset($layout_info[$id])){ foreach($layout_info[$id] as $layout_position => $value){ if (is_array($value) && $value['active']===true){ switch($layout_position){ case 'left_1': case 'left_2': case 'right_1': case 'right_2': $count_horizontal++; break; } } } } switch($count_horizontal){ case 0://full-width $width_sbr = 0; $width_blg = 960; $wpts_layout = "fullwidth"; break; case 1://With one Sidebar if(get_option("themeshock_content_layout") === 'content_layout_small'){ $width_sbr = 220; $width_blg = 720; }elseif(get_option("themeshock_content_layout") === 'content_layout_normal'){ $width_sbr = 300; $width_blg = 640; } $wpts_layout = "sidebar_1"; break; case 2://With two Sidebar $width_sbr = 220; $width_blg = 480; $wpts_layout = "sidebar_2"; break; } if(isset($GLOBALS['posts_layout'])){ $posts_layout = $GLOBALS['posts_layout'][0]; $grid_post_size = $GLOBALS['posts_layout'][1]; }else{ $posts_layout = get_option("themeshock_grid_post"); $grid_post_size = get_option("themeshock_grid_post_size"); } if($posts_layout == "Grid" && !is_single() && !is_page()){ if($wpts_layout == "sidebar_1" && $grid_post_size == "Small" ){ echo ''; }elseif($wpts_layout == "sidebar_1" && $grid_post_size == "Normal"){ echo ''; } if($wpts_layout == "sidebar_2" && $grid_post_size == "Small"){ echo ''; }elseif($wpts_layout == "sidebar_2" && $grid_post_size == "Normal"){ echo ''; } if($wpts_layout == "fullwidth" && $grid_post_size == "Small"){ echo ''; }elseif($wpts_layout == "fullwidth" && $grid_post_size == "Normal"){ echo ''; } }else{?> $sidebar_properties ){ switch ($position){ case 'left_1': case 'left_2': case 'right_1': unset($layout_top_info[$position]); continue 2; case 'right_2': unset($layout_top_info[$position]); break 2; } if(isset($sidebar_properties['active']) && $sidebar_properties['active']===true){?>