Skip to content

Commit

Permalink
Improved font stacks choices.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyclark13 committed Dec 13, 2012
1 parent 2e420ad commit cf6ac84
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 16 deletions.
4 changes: 2 additions & 2 deletions inc/options-framework.php
Expand Up @@ -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 {

/*
Expand Down Expand Up @@ -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;
}
}

Expand Down
49 changes: 35 additions & 14 deletions options.php
Expand Up @@ -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' ),
Expand Down Expand Up @@ -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" );
Expand Down Expand Up @@ -966,6 +986,7 @@ function tech_options_display_sidebar() {
<ul>
<li>Performance increased by caching css generated by settings.</li>
<li>Added Twitter Feed widget.</li>
<li>Improved font stacks.</li>
<li>Added new template tags to reduce repeated code.</li>
<li>Updated Posts page layout.</li>
<li>Responsive styling updated.</li>
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Expand Up @@ -39,6 +39,7 @@ Installation can be done automatically through the Install Themes feature or man
= Version 2.1 =
* Performance increased by caching css generated by settings.
* Added Twitter Feed widget.
* Improved font stacks.
* Added new template tags to reduce repeated code.
* Updated Posts page layout.
* Responsive styling updated.
Expand Down

0 comments on commit cf6ac84

Please sign in to comment.