typography = "Typography"; global $best_magazine_special_id_for_db; $this->shorttypography = $best_magazine_special_id_for_db."ty"; ////GET PARAMETRS FORM DATABESE //headrs fonts $value_of_std[0]=get_theme_mod($this->shorttypography."_type_headers_font",'Segoe UI'); $value_of_std[1]=get_theme_mod($this->shorttypography."_type_headers_kern",'0.00em'); $value_of_std[2]=get_theme_mod($this->shorttypography."_type_headers_transform",'none'); $value_of_std[3]=get_theme_mod($this->shorttypography."_type_headers_variant",'normal'); $value_of_std[4]=get_theme_mod($this->shorttypography."_type_headers_weight",'normal'); $value_of_std[5]=get_theme_mod($this->shorttypography."_type_headers_style",'normal'); //inputs fonts $value_of_std[6]=get_theme_mod($this->shorttypography."_type_inputs_font",'Segoe UI'); $value_of_std[7]=get_theme_mod($this->shorttypography."_type_inputs_kern",'0.00em'); $value_of_std[8]=get_theme_mod($this->shorttypography."_type_inputs_transform",'none'); $value_of_std[9]=get_theme_mod($this->shorttypography."_type_inputs_variant",'normal'); $value_of_std[10]=get_theme_mod($this->shorttypography."_type_inputs_weight",'normal'); $value_of_std[11]=get_theme_mod($this->shorttypography."_type_inputs_style",'normal'); //primary fonts $value_of_std[12]=get_theme_mod($this->shorttypography."_type_primary_font",'Segoe UI'); $value_of_std[13]=get_theme_mod($this->shorttypography."_type_primary_kern",'0.00em'); $value_of_std[14]=get_theme_mod($this->shorttypography."_type_primary_transform",'none'); $value_of_std[15]=get_theme_mod($this->shorttypography."_type_primary_variant",'normal'); $value_of_std[16]=get_theme_mod($this->shorttypography."_type_primary_weight",'normal'); $value_of_std[17]=get_theme_mod($this->shorttypography."_type_primary_style",'normal'); //secondary fonts $value_of_std[18]=get_theme_mod($this->shorttypography."_type_secondary_font",'Segoe UI'); $value_of_std[19]=get_theme_mod($this->shorttypography."_type_secondary_kern",'0.00em'); $value_of_std[20]=get_theme_mod($this->shorttypography."_type_secondary_transform",'none'); $value_of_std[21]=get_theme_mod($this->shorttypography."_type_secondary_variant",'normal'); $value_of_std[22]=get_theme_mod($this->shorttypography."_type_secondary_weight",'normal'); $value_of_std[23]=get_theme_mod($this->shorttypography."_type_secondary_style",'normal'); $this->options_typography = array( array( "name" => "Typography", "type" => "title" ), array( "type" => "open" ), ////////// HEADER PARAMETRS 'type_headers_font'=>array( "name" => "Select Font", "var_name" =>'type_headers_font', "all_values" => $this->fonts_options(), "id" => $this->shorttypography."_type_headers_font", "type" => "select", "std" => $value_of_std[0] ), 'type_headers_kern'=>array( "name" => "Letter Spacing", "var_name" =>'type_headers_kern', "all_values" => $this->inputs_kern(), "id" => $this->shorttypography."_type_headers_kern", "type" => "", "std" => $value_of_std[1] ), 'type_headers_transform'=>array( "name" => "Text Transform", "var_name" =>'type_headers_transform', "all_values" => $this->text_transform(), "id" => $this->shorttypography."_type_headers_transform", "type" => "", "std" => $value_of_std[2] ), 'type_headers_variant'=>array( "name" => "Variant", "var_name" =>'type_headers_variant', "all_values" => $this->text_variant(), "id" => $this->shorttypography."_type_headers_variant", "type" => "", "std" => $value_of_std[3] ), 'type_headers_weight'=>array( "name" => "Weight", "var_name" =>'type_headers_weight', "all_values" => $this->text_weight(), "id" => $this->shorttypography."_type_headers_weight", "type" => "", "std" => $value_of_std[4] ), 'type_headers_style'=>array( "name" => "Style", "var_name" =>'type_headers_style', "all_values" => $this->text_stylee(), "id" => $this->shorttypography."_type_headers_style", "type" => "", "std" => $value_of_std[5] ), ////////// INPUTS PARAMETRS 'type_inputs_font'=>array( "name" => "Select Font", "var_name" =>'type_inputs_font', "all_values" => $this->fonts_options(), "id" => $this->shorttypography."_type_inputs_font", "type" => "", "std" => $value_of_std[6] ), 'type_inputs_kern' => array( "name" => "Letter Spacing", "var_name" =>'type_inputs_kern', "all_values" => $this->inputs_kern(), "id" => $this->shorttypography."_type_inputs_kern", "type" => "", "std" => $value_of_std[7] ), 'type_inputs_transform'=>array( "name" => "Text Transform", "var_name" =>'type_inputs_transform', "all_values" => $this->text_transform(), "id" => $this->shorttypography."_type_inputs_transform", "type" => "", "std" => $value_of_std[8] ), 'type_inputs_variant'=>array( "name" => "Variant", "var_name" =>'type_inputs_variant', "all_values" => $this->text_variant(), "id" => $this->shorttypography."_type_inputs_variant", "type" => "", "std" => $value_of_std[9] ), 'type_inputs_weight'=>array( "name" => "Weight", "var_name" =>'type_inputs_weight', "all_values" => $this->text_weight(), "id" => $this->shorttypography."_type_inputs_weight", "type" => "", "std" => $value_of_std[10] ), 'type_inputs_style'=>array( "name" => "Style", "var_name" =>'type_inputs_style', "all_values" => $this->text_stylee(), "id" => $this->shorttypography."_type_inputs_style", "type" => "", "std" => $value_of_std[11] ), ////////// LINKS PARAMETRS 'type_primary_font'=>array( "name" => "Select Font", "var_name" =>'type_primary_font', "all_values" => $this->fonts_options(), "id" => $this->shorttypography."_type_primary_font", "desc" => "", "type" => "", "std" => $value_of_std[12] ), 'type_primary_kern'=>array( "name" => "Letter Spacing", "var_name" =>'type_primary_kern', "all_values" => $this->inputs_kern(), "id" => $this->shorttypography."_type_primary_kern", "type" => "", "std" => $value_of_std[13] ), 'type_primary_transform'=>array( "name" => "Text Transform", "var_name" =>'type_primary_transform', "all_values" => $this->text_transform(), "id" => $this->shorttypography."_type_primary_transform", "type" => "", "std" => $value_of_std[14] ), 'type_primary_variant'=>array( "name" => "Variant", "var_name" =>'type_primary_variant', "all_values" => $this->text_variant(), "id" => $this->shorttypography."_type_primary_variant", "type" => "", "std" => $value_of_std[15] ), 'type_primary_weight'=>array( "name" => "Weight", "var_name" =>'type_primary_weight', "all_values" => $this->text_weight(), "id" => $this->shorttypography."_type_primary_weight", "type" => "", "std" => $value_of_std[16] ), 'type_primary_style'=>array( "name" => "Style", "var_name" =>'type_primary_style', "all_values" => $this->text_stylee(), "id" => $this->shorttypography."_type_primary_style", "type" => "", "std" => $value_of_std[17] ), ////////// SECONDARY PARAMETRS 'type_secondary_font'=>array( "name" => "Select Font", "var_name" =>'type_secondary_font', "all_values" => $this->fonts_options(), "id" => $this->shorttypography."_type_secondary_font", "type" => "", "std" => $value_of_std[18] ), 'type_secondary_kern'=>array( "name" => "Letter Spacing", "var_name" =>'type_secondary_kern', "all_values" => $this->inputs_kern(), "id" => $this->shorttypography."_type_secondary_kern", "type" => "", "std" => $value_of_std[19] ), 'type_secondary_transform'=>array( "name" => "Text Transform", "var_name" =>'type_secondary_transform', "all_values" => $this->text_transform(), "id" => $this->shorttypography."_type_secondary_transform", "type" => "", "std" => $value_of_std[20] ), 'type_secondary_variant'=>array( "name" => "Variant", "var_name" =>'type_secondary_variant', "all_values" => $this->text_variant(), "id" => $this->shorttypography."_type_secondary_variant", "type" => "", "std" => $value_of_std[21] ), 'type_secondary_weight'=>array( "name" => "Weight", "var_name" =>'type_secondary_weight', "all_values" => $this->text_weight(), "id" => $this->shorttypography."_type_secondary_weight", "type" => "", "std" => $value_of_std[22] ), 'type_secondary_style'=>array( "name" => "Style", "var_name" =>'type_secondary_style', "all_values" => $this->text_stylee(), "id" => $this->shorttypography."_type_secondary_style", "type" => "", "std" => $value_of_std[23] ), array( "type" => "close" ) ); } /***********************************/ /* SAVE AND RESET PARAMETRS */ /***********************************/ public function web_dorado_theme_update_and_get_options_typography(){ if (isset($_GET['page']) && $_GET['page'] == "web_dorado_theme" && isset($_GET['controller']) && $_GET['controller'] == "typography_page") { if (isset($_REQUEST['action']) == 'save' ) { foreach ($this->options_typography as $value) { if (isset($value['var_name']) && isset($_REQUEST[$value['var_name']])) { set_theme_mod($value['id'], $_REQUEST[$value['var_name']]); } } header("Location: themes.php?page=web_dorado_theme&controller=typography_page&saved=true"); die; } else if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'reset') { foreach ($this->options_typography as $value) { if(isset($value['var_name'])) remove_theme_mod($value['id']); } header("Location: themes.php?page=web_dorado_theme&controller=typography_page&reset=true"); die; } } } /***********************************/ /* COLOR CONTROL SCRIPTS AND STYLES*/ /***********************************/ public function web_dorado_typography_page_admin_scripts(){ wp_enqueue_style('typagraphi_page_main_style',get_template_directory_uri().'/admin/css/typography_page.css'); wp_enqueue_script('jquery'); } /***********************************/ /* BACK END ADMIN HTML */ /***********************************/ public function dorado_theme_admin_typography(){ if(isset($_REQUEST['controller']) && $_REQUEST['controller']=='typography_page'){ if (isset($_REQUEST['saved']) && $_REQUEST['saved'] ) echo '
Typography settings saved.
Typography settings reset.