From cf6ac840b8630bc95ae56235afeb4afd50e78688 Mon Sep 17 00:00:00 2001 From: Jeremy Clark Date: Thu, 13 Dec 2012 15:46:57 -0500 Subject: [PATCH] Improved font stacks choices. --- inc/options-framework.php | 4 ++-- options.php | 49 ++++++++++++++++++++++++++++----------- readme.txt | 1 + 3 files changed, 38 insertions(+), 16 deletions(-) diff --git a/inc/options-framework.php b/inc/options-framework.php index e5cf5db..059b028 100644 --- a/inc/options-framework.php +++ b/inc/options-framework.php @@ -281,9 +281,9 @@ function optionsframework_validate( $input ) { if ( isset( $_POST['reset'] ) ) { add_settings_error( 'options-framework', 'restore_defaults', __( 'Default options restored.', 'options_framework_theme' ), 'updated fade' ); - return of_get_default_values(); //deletes css cache after saving. delete_transient( 'tech_css_cache' ); + return of_get_default_values(); } else { /* @@ -326,9 +326,9 @@ function optionsframework_validate( $input ) { } add_settings_error( 'options-framework', 'save_options', __( 'Options saved.', 'options_framework_theme' ), 'updated fade' ); - return $clean; //deletes css cache after saving. delete_transient( 'tech_css_cache' ); + return $clean; } } diff --git a/options.php b/options.php index edd9bb2..0073872 100644 --- a/options.php +++ b/options.php @@ -60,6 +60,19 @@ function optionsframework_options() { // If using image radio buttons, define a directory path $imagepath = get_template_directory_uri() . '/images/'; + $typography_options = array( + 'faces' => array("Arial, 'Helvetica Neue', Helvetica, sans-serif" => 'Arial', + "Verdana, Geneva, sans-serif" => 'Verdana, Geneva', + "Trebuchet MS', 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif" => 'Trebuchet', + "Georgia, Times, 'Times New Roman', serif" => 'Georgia', + "TimesNewRoman, 'Times New Roman', Times, Baskerville, Georgia, serif" => "Times New Roman", + "Tahoma, Geneva, Verdana, Segoe, sans-serif" => "Tahoma, Geneva", + "Palatino, 'Palatino Linotype', 'Palatino LT STD', 'Book Antiqua', Georgia, serif" => "Palatino", + "'Helvetica Neue', Helvetica, Arial, sans-serif" => "Helvetica", + "google1" => "Google Font 1", + "google2" => "Google Font 2") + ); + $options = array( ); $options[] = array( "name" => __( 'Layout', 'techozoic' ), @@ -308,38 +321,45 @@ function optionsframework_options() { $options[] = array( "name" => __( 'Default Text', 'techozoic' ), "id" => "body_font", - "std" => array( 'size' => "14px", 'face' => 'arial', 'style' => '', 'color' => '#2C4353' ), - "type" => "typography" ); + "std" => array( 'size' => "14px", 'face' => "Arial, 'Helvetica Neue', Helvetica, sans-serif", 'style' => '', 'color' => '#2C4353' ), + "type" => "typography", + "options" => $typography_options); $options[] = array( "name" => __( 'Main Heading Font', 'techozoic' ), "id" => "main_heading_font", - "std" => array( 'size' => "30px", 'face' => 'verdana', 'style' => 'bold', 'color' => '#A0B3C2' ), - "type" => "typography" ); + "std" => array( 'size' => "30px", 'face' => 'Verdana, Geneva, sans-serif', 'style' => 'bold', 'color' => '#A0B3C2' ), + "type" => "typography", + "options" => $typography_options ); $options[] = array( "name" => __( 'Post Heading Font', 'techozoic' ), "id" => "post_heading", - "std" => array( 'size' => "24px", 'face' => 'verdana', 'style' => 'bold', 'color' => '#2C4353' ), - "type" => "typography" ); + "std" => array( 'size' => "24px", 'face' => 'Verdana, Geneva, sans-serif', 'style' => 'bold', 'color' => '#2C4353' ), + "type" => "typography", + "options" => $typography_options ); $options[] = array( "name" => __( 'Sidebar Heading Font', 'techozoic' ), "id" => "side_heading_font", - "std" => array( 'size' => "18px", 'face' => 'verdana', 'style' => 'bold', 'color' => '#2C4353' ), - "type" => "typography" ); + "std" => array( 'size' => "18px", 'face' => 'Verdana, Geneva, sans-serif', 'style' => 'bold', 'color' => '#2C4353' ), + "type" => "typography", + "options" => $typography_options ); $options[] = array( "name" => __( 'Nav Menu Text Font', 'techozoic' ), "id" => "nav_font", - "std" => array( 'size' => "14px", 'face' => 'verdana', 'style' => 'bold', 'color' => '#A0B3C2' ), - "type" => "typography" ); + "std" => array( 'size' => "14px", 'face' => 'Verdana, Geneva, sans-serif', 'style' => 'bold', 'color' => '#A0B3C2' ), + "type" => "typography", + "options" => $typography_options ); $options[] = array( "name" => __( 'Post Text Font', 'techozoic' ), "id" => "post_text_font", - "std" => array( 'size' => "14px", 'face' => 'arial', 'style' => '', 'color' => '#2C4353' ), - "type" => "typography" ); + "std" => array( 'size' => "14px", 'face' => "Arial, 'Helvetica Neue', Helvetica, sans-serif", 'style' => '', 'color' => '#2C4353' ), + "type" => "typography", + "options" => $typography_options ); $options[] = array( "name" => __( 'Metadata Font', 'techozoic' ), "id" => "small_font", - "std" => array( 'size' => "12px", 'face' => 'arial', 'style' => '', 'color' => '#777777' ), - "type" => "typography" ); + "std" => array( 'size' => "12px", 'face' => "Arial, 'Helvetica Neue', Helvetica, sans-serif", 'style' => '', 'color' => '#777777' ), + "type" => "typography", + "options" => $typography_options ); $options[] = array( "name" => __( 'Color', 'techozoic' ), "type" => "heading" ); @@ -966,6 +986,7 @@ function tech_options_display_sidebar() {