From 82dde526fc272e90d97a8b24599f566a74374e02 Mon Sep 17 00:00:00 2001 From: Chris Barnes Date: Mon, 2 Jan 2012 22:57:09 -0500 Subject: [PATCH] Beginnings of the theme options panel. --- admin/css/admin-style.css | 5 +++++ admin/images/320press-Logo-BW.png | Bin 0 -> 4648 bytes admin/options-framework.php | 4 +++- admin/options-interface.php | 31 ++++++++++++++++++++++++++++++ admin/options-sanitize.php | 16 +++++++++++++++ header.php | 29 ++++++++++++++++++++++++++++ options.php | 16 +++++++++++++-- 7 files changed, 98 insertions(+), 3 deletions(-) create mode 100644 admin/images/320press-Logo-BW.png diff --git a/admin/css/admin-style.css b/admin/css/admin-style.css index 52661452..5c2db9e0 100755 --- a/admin/css/admin-style.css +++ b/admin/css/admin-style.css @@ -2,6 +2,11 @@ /* OptionsFramework Admin Styles */ /*-------------------------------------------------------------------------------------------*/ +/* 320press branding */ +#options_ico{ + background: url('../images/320press-Logo-BW.png') no-repeat left top transparent; +} + .updated { max-width:764px; margin-bottom:0px !important; diff --git a/admin/images/320press-Logo-BW.png b/admin/images/320press-Logo-BW.png new file mode 100644 index 0000000000000000000000000000000000000000..db6d566d39e0f7ec6798dbe1349456bc937d2b51 GIT binary patch literal 4648 zcmeHLdr(tn77qvk5fstY017t|m0ck>3E>rk0tp~0EC#}(RqG|W34tUx++0cmDv(74 zAFV{+OAruk6m{GMQ9pJm9i}=P<)`Uz>I=gDBuI!n*!y*6zKjphT= zyg?6|JKcvx^JFpU!1#xU}|bAHPwTPpkk2j>+1{B z7$Ae;j(fN()p86{xyzNS^b|%8F02%w5(OqfyQmEcLl37B#cCRdKDjOz`mAO#MgfvCY}8d8yfV2CmSQM?;D zX*S@eh746;0wx|;FX$u|uS#G@R*4D0sU8NnVV{iAClhAH!10k7gc%AO7hy6eDN6e7x1`h^Jfx=3q z`&LAZunj3oB{LTAHVFHzynH2o5TjsJrkr*7Y2{61%m!!VW>4L47RRU`2f+`301K6i z5JP`Y_mKn$(I6ED3DJrE|E--P!PGN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b574dfa 100755 --- a/admin/options-framework.php +++ b/admin/options-framework.php @@ -211,7 +211,9 @@ function optionsframework_page() { ?>
- +

+ diff --git a/admin/options-interface.php b/admin/options-interface.php index 99ec1013..a8670709 100755 --- a/admin/options-interface.php +++ b/admin/options-interface.php @@ -218,6 +218,37 @@ function optionsframework_fields() { break; + // WPBS Typography - removed font size from std typography set of fields + case 'wpbs_typography': + + $wpbs_typography_stored = $val; + + // Font Face + $output .= ''; + + // Font Weight + $output .= ''; + + // Font Color + $output .= '
'; + $output .= ''; + + break; + // Background case 'background': diff --git a/admin/options-sanitize.php b/admin/options-sanitize.php index 5dc4b780..b301f05f 100755 --- a/admin/options-sanitize.php +++ b/admin/options-sanitize.php @@ -175,6 +175,21 @@ function of_sanitize_typography( $input ) { } add_filter( 'of_sanitize_typography', 'of_sanitize_typography' ); +function of_sanitize_wpbs_typography( $input ) { + $output = wp_parse_args( $input, array( + 'face' => '', + 'style' => '', + 'color' => '' + ) ); + + $output['face'] = apply_filters( 'of_font_face', $output['face'] ); + $output['style'] = apply_filters( 'of_font_style', $output['style'] ); + $output['color'] = apply_filters( 'of_color', $output['color'] ); + + return $output; +} +add_filter( 'of_sanitize_wpbs_typography', 'of_sanitize_wpbs_typography' ); + function of_sanitize_font_size( $value ) { $recognized = of_recognized_font_sizes(); @@ -302,6 +317,7 @@ function of_recognized_font_sizes() { */ function of_recognized_font_faces() { $default = array( + '"Helvetica Neue",Helvetica,Arial,sans-serif' => 'Default', 'arial' => 'Arial', 'verdana' => 'Verdana, Geneva', 'trebuchet' => 'Trebuchet', diff --git a/header.php b/header.php index 18ea6951..cb3bd7e4 100644 --- a/header.php +++ b/header.php @@ -41,6 +41,35 @@ + + + + ' . $theme_options_styles . ''; + } + + ?> + > diff --git a/options.php b/options.php index 7685c54f..15bf2db4 100755 --- a/options.php +++ b/options.php @@ -62,8 +62,20 @@ function optionsframework_options() { $options = array(); - $options[] = array( "name" => "Basic Settings", + $options[] = array( "name" => "Typography", "type" => "heading"); + + $options[] = array( "name" => "Headings", + "desc" => "Used in H1, H2, H3, H4, H5 & H6 tags.", + "id" => "heading_typography", + "std" => array('face' => '"Helvetica Neue",Helvetica,Arial,sans-serif','style' => 'bold italic','color' => '#123456'), + "type" => "wpbs_typography"); + + $options[] = array( "name" => "Main Body Text", + "desc" => "Used in P tags.", + "id" => "main_body_typography", + "std" => array('face' => '"Helvetica Neue",Helvetica,Arial,sans-serif','style' => 'bold italic','color' => '#123456'), + "type" => "wpbs_typography"); $options[] = array( "name" => "Input Text Mini", "desc" => "A mini text input field.", @@ -128,7 +140,7 @@ function optionsframework_options() { "std" => "1", "type" => "checkbox"); - $options[] = array( "name" => "Advanced Settings", + $options[] = array( "name" => "Top Nav", "type" => "heading"); $options[] = array( "name" => "Check to Show a Hidden Text Input",