Created
May 2, 2012 20:03
-
-
Save dreamattempo773/2579861 to your computer and use it in GitHub Desktop.
header.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The Header for the template. | |
* | |
* @package WordPress | |
*/ | |
$pp_theme_version = '1.0'; | |
?><!DOCTYPE html> | |
<html <?php language_attributes(); ?>> | |
<head> | |
<meta charset="<?php bloginfo( 'charset' ); ?>" /> | |
<title><?php wp_title('‹', true, 'right'); ?><?php bloginfo('name'); ?></title> | |
<link rel="profile" href="http://gmpg.org/xfn/11" /> | |
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" /> | |
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" /> | |
<?php | |
/** | |
* Get favicon URL | |
**/ | |
$pp_favicon = get_option('pp_favicon'); | |
if(!empty($pp_favicon)) | |
{ | |
?> | |
<link rel="shortcut icon" href="<?php echo $pp_favicon; ?>" /> | |
<?php | |
} | |
?> | |
<!-- Template stylesheet --> | |
<?php | |
wp_enqueue_style("jqueryui_css", get_bloginfo( 'stylesheet_directory' )."/css/jqueryui/custom.css", false, $pp_theme_version, "all"); | |
wp_enqueue_style("screen_css", get_bloginfo( 'stylesheet_directory' )."/css/screen.css", false, $pp_theme_version, "all"); | |
wp_enqueue_style("fancybox_css", get_bloginfo( 'stylesheet_directory' )."/js/fancybox/jquery.fancybox-1.3.0.css", false, $pp_theme_version, "all"); | |
wp_enqueue_style("videojs_css", get_bloginfo( 'stylesheet_directory' )."/js/video-js.css", false, $pp_theme_version, "all"); | |
wp_enqueue_style("vim_css", get_bloginfo( 'stylesheet_directory' )."/js/skins/vim.css", false, $pp_theme_version, "all"); | |
?> | |
<?php | |
/** | |
* Check Google Maps key | |
**/ | |
$pp_gm_key = get_option('pp_gm_key'); | |
if(!empty($pp_gm_key)) | |
{ | |
?> | |
<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=<?php echo $pp_gm_key; ?>&hl=en"></script> | |
<?php | |
} | |
?> | |
<?php | |
wp_enqueue_script("jQuery", get_bloginfo( 'stylesheet_directory' )."/js/jquery.js", false, $pp_theme_version); | |
wp_enqueue_script("jQuery_UI_js", get_bloginfo( 'stylesheet_directory' )."/js/jquery-ui.js", false, $pp_theme_version); | |
wp_enqueue_script("fancybox_js", get_bloginfo( 'stylesheet_directory' )."/js/fancybox/jquery.fancybox-1.3.0.js", false, $pp_theme_version); | |
wp_enqueue_script("jQuery_easing", get_bloginfo( 'stylesheet_directory' )."/js/jquery.easing.js", false, $pp_theme_version); | |
wp_enqueue_script("jQuery_nivo", get_bloginfo( 'stylesheet_directory' )."/js/jquery.nivo.slider.js", false, $pp_theme_version); | |
wp_enqueue_script("jQuery_anything_slider", get_bloginfo( 'stylesheet_directory' )."/js/anythingSlider.js", false, $pp_theme_version); | |
wp_enqueue_script("jQuery_kwicks", get_bloginfo( 'stylesheet_directory' )."/js/jquery.kwicks.js", false, $pp_theme_version); | |
/** | |
* Check Google Maps key | |
**/ | |
$pp_gm_key = get_option('pp_gm_key'); | |
if(!empty($pp_gm_key)) | |
{ | |
wp_enqueue_script("jQuery_gmap", get_bloginfo( 'stylesheet_directory' )."/js/gmap.js", false, $pp_theme_version); | |
} | |
wp_enqueue_script("jQuery_validate", get_bloginfo( 'stylesheet_directory' )."/js/jquery.validate.js", false, $pp_theme_version); | |
wp_enqueue_script("jQuery_cufon", get_bloginfo( 'stylesheet_directory' )."/js/cufon.js", false, $pp_theme_version); | |
/** | |
* Check selected font | |
**/ | |
$pp_font = get_option('pp_font'); | |
if(empty($pp_font)) | |
{ | |
$pp_font = 'Vegur_400.font'; | |
} | |
wp_enqueue_script("cufon_font", get_bloginfo( 'stylesheet_directory' )."/fonts/".$pp_font.".js", false, $pp_theme_version); | |
wp_enqueue_script("browser_js", get_bloginfo( 'stylesheet_directory' )."/js/browser.js", false, $pp_theme_version); | |
wp_enqueue_script("video_js", get_bloginfo( 'stylesheet_directory' )."/js/video.js", false, $pp_theme_version); | |
wp_enqueue_script("custom_js", get_bloginfo( 'stylesheet_directory' )."/js/custom.js", false, $pp_theme_version); | |
?> | |
<?php | |
/* Always have wp_head() just before the closing </head> | |
* tag of your theme, or you will break many plugins, which | |
* generally use this hook to add elements to <head> such | |
* as styles, scripts, and meta tags. | |
*/ | |
wp_head(); | |
?> | |
<!--[if lt IE 8]> | |
<link rel="stylesheet" href="<?php bloginfo( 'stylesheet_directory' ); ?>/css/ie7.css" type="text/css" media="all"/> | |
<![endif]--> | |
<style type="text/css"> | |
<?php | |
$pp_h1_font_color = get_option('pp_h1_font_color'); | |
if(!empty($pp_h1_font_color)) | |
{ | |
?> | |
h1,h2,h3,h4,h5,h6 { color:<?php echo $pp_h1_font_color; ?>; } | |
<?php | |
} | |
?> | |
<?php | |
$pp_header_textcolor = get_option('pp_header_textcolor'); | |
if(!empty($pp_header_textcolor)) | |
{ | |
?> | |
.header_title h2 { color:<?php echo $pp_header_textcolor; ?>; } | |
<?php | |
} | |
?> | |
<?php | |
$pp_h1_size = get_option('pp_h1_size'); | |
if(!empty($pp_h1_size)) | |
{ | |
?> | |
h1 { font-size:<?php echo $pp_h1_size; ?>px; } | |
<?php | |
} | |
?> | |
<?php | |
$pp_h2_size = get_option('pp_h2_size'); | |
if(!empty($pp_h2_size)) | |
{ | |
?> | |
h2 { font-size:<?php echo $pp_h2_size; ?>px; } | |
<?php | |
} | |
?> | |
<?php | |
$pp_h3_size = get_option('pp_h3_size'); | |
if(!empty($pp_h3_size)) | |
{ | |
?> | |
h3 { font-size:<?php echo $pp_h3_size; ?>px; } | |
<?php | |
} | |
?> | |
<?php | |
$pp_h4_size = get_option('pp_h4_size'); | |
if(!empty($pp_h4_size)) | |
{ | |
?> | |
h4 { font-size:<?php echo $pp_h4_size; ?>px; } | |
<?php | |
} | |
?> | |
<?php | |
$pp_h5_size = get_option('pp_h5_size'); | |
if(!empty($pp_h5_size)) | |
{ | |
?> | |
h5 { font-size:<?php echo $pp_h5_size; ?>px; } | |
<?php | |
} | |
?> | |
<?php | |
$pp_h6_size = get_option('pp_h6_size'); | |
if(!empty($pp_h6_size)) | |
{ | |
?> | |
h6 { font-size:<?php echo $pp_h6_size; ?>px; } | |
<?php | |
} | |
?> | |
<?php | |
$pp_font_color = get_option('pp_font_color'); | |
if(!empty($pp_font_color)) | |
{ | |
?> | |
body, .styled_box_content, blockquote h2 { color:<?php echo $pp_font_color; ?>; } | |
<?php | |
} | |
?> | |
<?php | |
$pp_link_color = get_option('pp_link_color'); | |
if(!empty($pp_link_color)) | |
{ | |
?> | |
a { color:<?php echo $pp_link_color; ?>; } | |
<?php | |
} | |
?> | |
<?php | |
$pp_hover_link_color = get_option('pp_hover_link_color'); | |
if(!empty($pp_hover_link_color)) | |
{ | |
?> | |
a:hover, a:active { color:<?php echo $pp_hover_link_color; ?>; } | |
<?php | |
} | |
?> | |
<?php | |
$pp_button_bg_color = get_option('pp_button_bg_color'); | |
if(!empty($pp_button_bg_color)) | |
{ | |
$pp_button_bg_color_light = '#'.hex_lighter(substr($pp_button_bg_color, 1), 20); | |
?> | |
input[type=submit], input[type=button], a.button { | |
background: <?php echo $pp_button_bg_color; ?>; | |
background: -webkit-gradient(linear, left top, left bottom, from(<?php echo $pp_button_bg_color_light; ?>), to(<?php echo $pp_button_bg_color; ?>)); | |
background: -moz-linear-gradient(top, <?php echo $pp_button_bg_color_light; ?>, <?php echo $pp_button_bg_color; ?>); | |
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='<?php echo $pp_button_bg_color_light; ?>', endColorstr='<?php echo $pp_button_bg_color; ?>'); | |
} | |
input[type=submit]:active, input[type=button]:active, a.button:active | |
{ | |
background: <?php echo $pp_button_bg_color; ?>; | |
background: -webkit-gradient(linear, left top, left bottom, from(<?php echo $pp_button_bg_color; ?>), to(<?php echo $pp_button_bg_color_light; ?>)); | |
background: -moz-linear-gradient(top, <?php echo $pp_button_bg_color; ?>, <?php echo $pp_button_bg_color_light; ?>); | |
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='<?php echo $pp_button_bg_color_light; ?>', endColorstr='<?php echo $pp_button_bg_color; ?>'); | |
} | |
<?php | |
} | |
?> | |
<?php | |
$pp_caption_header_color = get_option('pp_caption_header_color'); | |
if(!empty($pp_caption_header_color)) | |
{ | |
?> | |
.page_caption h1 | |
{ | |
color: <?php echo $pp_caption_header_color; ?>; | |
} | |
<?php | |
} | |
?> | |
<?php | |
$pp_caption_font_color = get_option('pp_caption_font_color'); | |
if(!empty($pp_caption_font_color)) | |
{ | |
?> | |
.caption_desc | |
{ | |
color: <?php echo $pp_caption_font_color; ?>; | |
} | |
<?php | |
} | |
?> | |
<?php | |
$pp_button_font_color = get_option('pp_button_font_color'); | |
if(!empty($pp_button_font_color)) | |
{ | |
?> | |
input[type=submit], input[type=button], a.button { | |
color: <?php echo $pp_button_font_color; ?>; | |
} | |
input[type=submit]:hover, input[type=button]:hover, a.button:hover | |
{ | |
color: <?php echo $pp_button_font_color; ?>; | |
} | |
<?php | |
} | |
?> | |
<?php | |
$pp_button_border_color = get_option('pp_button_border_color'); | |
if(!empty($pp_button_border_color)) | |
{ | |
?> | |
input[type=submit], input[type=button], a.button { | |
border: 1px solid <?php echo $pp_button_border_color; ?>; | |
} | |
<?php | |
} | |
?> | |
<?php | |
$pp_footer_font_color = get_option('pp_footer_font_color'); | |
if(!empty($pp_footer_font_color)) | |
{ | |
?> | |
#footer, #footer ul { color:<?php echo $pp_footer_font_color; ?>; } | |
<?php | |
} | |
?> | |
<?php | |
$pp_footer_link_color = get_option('pp_footer_link_color'); | |
if(!empty($pp_footer_link_color)) | |
{ | |
?> | |
#footer a { color:<?php echo $pp_footer_link_color; ?>; } | |
<?php | |
} | |
?> | |
<?php | |
$pp_footer_hover_link_color = get_option('pp_footer_hover_link_color'); | |
if(!empty($pp_footer_hover_link_color)) | |
{ | |
?> | |
#footer a:hover, #footer a:active { color:<?php echo $pp_footer_hover_link_color; ?>; } | |
<?php | |
} | |
?> | |
<?php | |
$pp_slider_opacity = get_option('pp_slider_opacity'); | |
if(empty($pp_slider_opacity)) | |
{ | |
$pp_slider_opacity = 40; | |
} | |
?> | |
img.fade { | |
opacity: <?php echo $pp_slider_opacity/100; ?>; | |
filter:alpha(opacity=<?php echo $pp_slider_opacity; ?>); | |
} | |
</style> | |
<?php | |
/** | |
* Get custom CSS | |
**/ | |
$pp_custom_css = get_option('pp_custom_css'); | |
if(!empty($pp_custom_css)) | |
{ | |
echo '<style>'; | |
echo $pp_custom_css; | |
echo '</style>'; | |
} | |
?> | |
</head> | |
<?php | |
/** | |
* Get Current page object | |
**/ | |
$page = get_page($post->ID); | |
/** | |
* Get current page id | |
**/ | |
$current_page_id = ''; | |
if(isset($page->ID)) | |
{ | |
$current_page_id = $page->ID; | |
} | |
?> | |
<body <?php body_class(); ?>> | |
<!-- Begin template wrapper --> | |
<div id="wrapper"> | |
<!-- Begin header --> | |
<div id="header_wrapper"> | |
<div id="top_bar"> | |
<div class="logo"> | |
<!-- Begin logo --> | |
<?php | |
//get custom logo | |
$pp_logo = get_option('pp_logo'); | |
if(empty($pp_logo)) | |
{ | |
$pp_logo = get_bloginfo( 'stylesheet_directory' ).'/images/logo.png'; | |
} | |
?> | |
<a id="custom_logo" href="<?php bloginfo( 'url' ); ?>"><img src="<?php echo $pp_logo?>" alt=""/></a> | |
<!-- End logo --> | |
</div> | |
<!-- Begin main nav --> | |
<div id="menu_wrapper"> | |
<div class="left_menu_wrapper"></div> | |
<?php | |
//Get page nav | |
wp_nav_menu( | |
array( | |
'menu_id' => 'main_menu', | |
'menu_class' => 'nav', | |
'theme_location' => 'primary-menu', | |
) | |
); | |
?> | |
<div class="right_menu_wrapper"></div> | |
</div> | |
<!-- End main nav --> | |
</div> | |
</div> | |
<?php | |
$pp_gallery_slider_speed = get_option('pp_gallery_slider_speed'); | |
if(empty($pp_gallery_slider_speed)) | |
{ | |
$pp_gallery_slider_speed = 5; | |
} | |
?> | |
<input type="hidden" id="slider_speed" name="slider_speed" value="<?php echo $pp_gallery_slider_speed; ?>"/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment