Skip to content
Browse files

Catch-all. Most of this isn't feature-complete.

  • Loading branch information...
1 parent 038a5ce commit d5a8d733d39de834b5fbe8271da50ea3cb23a842 @zamoose committed Aug 2, 2012
Showing with 21 additions and 11 deletions.
  1. +5 −1 includes/functions/headers.php
  2. +12 −4 includes/functions/options.php
  3. +0 −2 includes/functions/supports.php
  4. +4 −4 includes/parent-options.php
View
6 includes/functions/headers.php
@@ -34,6 +34,7 @@ function lblg_register_headers(){
'width' => '960',
'flex-width' => true,
'default-text-color' => 'ffffff',
+ 'default-image' => '%s/images/headers/lakeshore.jpg',
'wp-head-callback' => 'lblg_header_style',
'admin-head-callback' => 'lblg_admin_header_style'
);
@@ -97,7 +98,10 @@ function lblg_header_style() {
<style type="text/css">
#header{
background: url(<?php header_image() ?>) bottom left no-repeat;
- background-size: cover;
+ /*background-size: cover;*/
+ background-height: <?php get_custom_header()->height; ?>;
+ background-width: <?php get_custom_header()->width; ?>;
+ height: <?php get_custom_header()->height; ?>;
}
<?php if ( 'blank' == get_header_textcolor() ) { ?>
#header h1, #header #description {
View
16 includes/functions/options.php
@@ -53,11 +53,11 @@ function lblg_options_init(){
// child-options.php file, if we're running as a child theme.
$lblg_default_options = lblg_get_default_options();
$lblg_defaults = lblg_get_options_from_defaults( $lblg_default_options );
-
+
if( ( false === $lblg_stored_options ) || ( '' == $lblg_stored_options ) ){
// We haven't been installed yet.
- $lblg_options = lblg_get_options_from_defaults( $lblg_default_options );
- } elseif( version_compare( $lblg_version, $lblg_stored_options['version'], '>' )) {
+ $lblg_options = $lblg_defaults;
+ } elseif( (version_compare( $lblg_version, $lblg_stored_options['version'], '!=' )) || (count($lblg_stored_options) != count($lblg_default_options))) {
// New version of the options have been detected. Let's reload.
$lblg_options = $lblg_stored_options + $lblg_default_options;
} else {
@@ -151,6 +151,8 @@ function lblg_get_default_options(){
$temp_options = $parent_options_array;
}
+ //lblg_filter_default_options( $temp_options );
+
return $temp_options;
}
@@ -160,12 +162,18 @@ function lblg_get_default_options(){
* @global string $lblg_shortname
* @global array $lblg_default_options
* @global array $lblg_options
+ * @global array $lblg_defaults
* @param array $input
* @return array
*/
function lblg_sanitize_options( $input ){
global $lblg_shortname, $lblg_default_options, $lblg_options, $lblg_defaults;
+ // echo '<h2>$lblg_options</h2>';
+ // print_r($lblg_options);
+ // echo '<h2>$lblg_defaults</h2>';
+ // print_r($lblg_defaults);
+
$submit = ( ! empty( $input['save']) ? true : false );
$reset = ( ! empty( $input['reset']) ? true : false );
$tabbed = ( !empty( $input['tab']) ? true : false );
@@ -180,7 +188,7 @@ function lblg_sanitize_options( $input ){
} else {
// If they don't exist for some reason, we use the defaults
// as our valid input test
- $valid_input = lblg_get_options_from_defaults( $lblg_default_options );
+ $valid_input = $lblg_defaults; //lblg_get_options_from_defaults( $lblg_default_options );
}
if( !isset( $lblg_default_options['tabs'] ) ){
View
2 includes/functions/supports.php
@@ -10,8 +10,6 @@
* @since Elbee-Elgee 1.0
*
*/
-global $lblg_options;
-
/**
* Register all the sidebar areas
*/
View
8 includes/parent-options.php
@@ -97,10 +97,10 @@
"options" => array("rows" => "5",
"cols" => "40") ),
- "header_text_color" => array( "name" => "Header Text Color",
- "desc" => "The text color for the header.",
- "std" => "ffffff",
- "type" => "colorpicker"),
+ // "header_text_color" => array( "name" => "Header Text Color",
+ // "desc" => "The text color for the header.",
+ // "std" => "ffffff",
+ // "type" => "colorpicker"),
)
),

0 comments on commit d5a8d73

Please sign in to comment.
Something went wrong with that request. Please try again.