themeoptions = "Layout Editor"; $this->shortthemeoptions = $business_world_special_id_for_db."gs"; $this->layout = array( "1" => "No Sidebar", "2" => "one right", "3" => "one left", "4" => "two right", "5" => "two left", "6"=>"one right and one left" ); // get and initial stnadart values $value_of_std[0]=get_theme_mod($this->shortthemeoptions."_default_layout",1); $value_of_std[1]=get_theme_mod($this->shortthemeoptions."_full_width",""); $value_of_std[2]=get_theme_mod($this->shortthemeoptions."_content_area","1024"); $value_of_std[3]=get_theme_mod($this->shortthemeoptions."_main_column","67"); $value_of_std[4]=get_theme_mod($this->shortthemeoptions."_pwa_width","16"); $this->options_themeoptions = array ( "default_layout" => array( "name" => "Choose Default Layout", "desc" => "Here you can select the default layout for pages and posts on the website.", "id" => $this->shortthemeoptions."_default_layout", "var_name" => "default_layout", "type" => "radio", "options" => $this->layout, "std" => $value_of_std[0] ), "full_width" =>array( "name" => "Full Width", "desc" => "", "var_name" => "full_width", "id" => $this->shortthemeoptions."_full_width", "type" => "checkbox", "std" => $value_of_std[1] ), "content_area" =>array( "name" => "Content Area Width", "desc" => "Specify the width of the Content Area", "var_name" => "content_area", "id" => $this->shortthemeoptions."_content_area", "type" => "text", "extend_simvol" => "px", "std" => $value_of_std[2] ), "main_column" =>array( "name" => "Main Column Width", "desc" => "Specify the width of the Main Column", "var_name" => "main_column", "id" => $this->shortthemeoptions."_main_column", "type" => "text", "extend_simvol" => "%", "std" => $value_of_std[3] ), "pwa_width" =>array( "name" => "Primary Widget Area width", "desc" => "Specify the width of the Primary Widget Area", "var_name" => "pwa_width", "id" => $this->shortthemeoptions."_pwa_width", "type" => "text", "extend_simvol" => "%", "std" => $value_of_std[4] ), ); } /***********************************/ /* SAVE AND RESET PARAMETRS */ /***********************************/ public function web_dorado_theme_update_and_get_options_layout(){ if (isset($_GET['page']) && $_GET['page'] =="web_dorado_theme" && isset($_GET['controller']) && $_GET['controller'] == "layout_page") { if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'save') { foreach ($this->options_themeoptions as $value) { set_theme_mod($value['id'], $_REQUEST[$value['var_name']]); } foreach ($this->options_themeoptions as $value) { if (isset($_REQUEST[$value['var_name']])) { set_theme_mod($value['id'], $_REQUEST[$value['var_name']]); } else { remove_theme_mod($value['id']); } } header("Location: themes.php?page=web_dorado_theme&controller=layout_page&saved=true"); die; } elseif (isset($_REQUEST['action']) && $_REQUEST['action'] == 'reset') { foreach ($this->options_themeoptions as $value) { remove_theme_mod($value['id']); } header("Location: themes.php?page=web_dorado_theme&controller=layout_page&reset=true"); die; } } } /***********************************/ /* COLOR CONTROL SCRIPTS AND STYLES*/ /***********************************/ public function web_dorado_layout_page_admin_scripts(){ wp_enqueue_style('layout_page_main_style',get_template_directory_uri().'/admin/css/layout_page.css'); } /***********************************/ /* BACK END ADMIN HTML */ /***********************************/ public function dorado_theme_admin_layout(){ global $business_world_admin_helepr_functions; // get radio variables $radio = $this->get_option_type( 'radio' ); $radio_options = $radio[0]['options']; $count_radio_options = count( $radio_options ); // get checkbox variables $checkbox=$this->get_option_type( 'checkbox' ); // get text variables $text=$this->get_option_type( 'text' ); $count_text = count( $text ); if (isset($_REQUEST['saved']) && $_REQUEST['saved'] && isset($_GET['controller']) && $_GET['controller'] == "layout_page" ) echo '

Layout settings are saved.

'; if (isset($_REQUEST['reset']) && $_REQUEST['reset'] && isset($_GET['controller']) && $_GET['controller'] == "layout_page" ) echo '

Layout settings are reset.

'; global $business_world_web_dor; ?>
User Manual
This section allows you to make changes in default layout of the theme. More...

Layout Editor

name="" value="" onclick="javascript:showRadioValue()">
only_checkbox($this->options_themeoptions['full_width']); ?> only_input($text[$i],array("input_size"=>"4")); } ?>

options_themeoptions as $option ){ if( $option['type'] == $type ){ $cur_type_elements[$k]=$option; $k++; } } return $cur_type_elements; } /***********************************/ /* FRONT END LAYOUT */ /***********************************/ public function update_layout_editor(){ foreach ($this->options_themeoptions as $value) { if(isset($value['id'])){ $$value['var_name'] = $value['std']; } } if ($full_width) { $content_width ='100%'; $them_content_are_width='100%'; ?>