'
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', )); } // This theme uses post thumbnails add_theme_support( 'post-thumbnails' ); // Add default posts and comments RSS feed links to head add_theme_support( 'automatic-feed-links' ); //this allows for custom options require_once('theme-options.php'); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => __( 'Primary Navigation', 'BinaryStylo' ), ) ); // Your changeable header business starts here define( 'HEADER_TEXTCOLOR', '' ); // No CSS, just IMG call. The %s is a placeholder for the theme template directory URI. define( 'HEADER_IMAGE', '%s/images/headers/silver.png' ); // The height and width of your custom header. You can hook into the theme's own filters to change these values. // Add a filter to twentyten_header_image_width and twentyten_header_image_height to change these values. define( 'HEADER_IMAGE_WIDTH', apply_filters( 'binarystylo_header_image_width', 1024 ) ); define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'binarystylo_header_image_height', 120 ) ); // We'll be using post thumbnails for custom header images on posts and pages. // We want them to be 940 pixels wide by 198 pixels tall. // Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php. set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true ); // Don't support text inside the header image. define( 'NO_HEADER_TEXT', true ); // Add a way for the custom header to be styled in the admin panel that controls // custom headers. See twentyten_admin_header_style(), below. add_custom_image_header( '', 'binarystylo_admin_header_style' ); // ... and thus ends the changeable header business. // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI. register_default_headers( array( 'white' => array( 'url' => '%s/images/headers/white.png', 'thumbnail_url' => '%s/images/headers/white-thumbnail.png', /* translators: header image description */ 'description' => __( 'White', 'binarystylo' ) ), 'silver' => array( 'url' => '%s/images/headers/silver.png', 'thumbnail_url' => '%s/images/headers/silver-thumbnail.png', /* translators: header image description */ 'description' => __( 'Silver', 'binarystylo' ) ), 'black' => array( 'url' => '%s/images/headers/black.png', 'thumbnail_url' => '%s/images/headers/black-thumbnail.png', /* translators: header image description */ 'description' => __( 'Black', 'binarystylo' ) ) ) ); function isHex($hexValue) { if($hexValue == dechex(hexdec($hexValue))) return true; return false; } function html2rgb($color) { if ($color[0] == '#') $color = substr($color, 1); if (strlen($color) == 6) list($r, $g, $b) = array($color[0].$color[1], $color[2].$color[3], $color[4].$color[5]); elseif (strlen($color) == 3) list($r, $g, $b) = array($color[0].$color[0], $color[1].$color[1], $color[2].$color[2]); else return false; $r = hexdec($r); $g = hexdec($g); $b = hexdec($b); return array($r, $g, $b); } function rgb2html($r, $g=-1, $b=-1) { if (is_array($r) && sizeof($r) == 3) list($r, $g, $b) = $r; $r = intval($r); $g = intval($g); $b = intval($b); $r = dechex($r<0?0:($r>255?255:$r)); $g = dechex($g<0?0:($g>255?255:$g)); $b = dechex($b<0?0:($b>255?255:$b)); $color = (strlen($r) < 2?'0':'').$r; $color .= (strlen($g) < 2?'0':'').$g; $color .= (strlen($b) < 2?'0':'').$b; return '#'.$color; } function blendcolors($color1, $color2, $trans) { $color1 = html2rgb($color1); $color2 = html2rgb($color2); for ($x = 0; $x < 3; $x += 1) { echo " C1#".$color1[$x]; echo " C2".$color2[$x]; $color1[$x] = $color1[$x] + ($trans * ($color2[$x] - $color1[$x])); echo " R#".$color1[$x]; echo "/n"; } return rgb2html($color1); } ?>