PageRenderTime 48ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 1ms

/htdocs/wp-content/themes/phc/header.php

https://bitbucket.org/dkrzos/phc
PHP | 90 lines | 55 code | 15 blank | 20 comment | 9 complexity | 24b81d609f28f8c1b9e189230e24ba88 MD5 | raw file
Possible License(s): GPL-2.0
  1. <?php
  2. /**
  3. * The Header for our theme.
  4. *
  5. * Displays all of the <head> section
  6. *
  7. * @package WordPress
  8. * @subpackage Starkers
  9. * @since Starkers HTML5 3.0
  10. */
  11. ?><!DOCTYPE html>
  12. <html <?php language_attributes(); ?>>
  13. <head>
  14. <meta charset="<?php bloginfo( 'charset' ); ?>" />
  15. <link rel="icon" type="image/png" href="<?php bloginfo('stylesheet_directory'); ?>/img/favico.png"/>
  16. <title><?php
  17. global $page, $paged;
  18. wp_title( '|', true, 'right' );
  19. bloginfo( 'name' );
  20. $site_description = get_bloginfo( 'description', 'display' );
  21. if ( $site_description && ( is_home() || is_front_page() ) )
  22. echo " | $site_description";
  23. if ( $paged >= 2 || $page >= 2 )
  24. echo ' | ' . sprintf( __( 'Page %s', 'starkers' ), max( $paged, $page ) );
  25. ?></title>
  26. <link rel="profile" href="http://gmpg.org/xfn/11" />
  27. <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_directory' ); ?>/css/fonts/stylesheet.css" />
  28. <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
  29. <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  30. <script src="<?php bloginfo('template_directory'); ?>/js/modernizr-1.6.min.js"></script>
  31. <script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery-1.7.2.min.js"></script>
  32. <script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery.cycle.all.js"></script>
  33. <script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/header.js"></script>
  34. <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
  35. <?php
  36. /* We add some JavaScript to pages with the comment form
  37. * to support sites with threaded comments (when in use).
  38. */
  39. if ( is_singular() && get_option( 'thread_comments' ) )
  40. wp_enqueue_script( 'comment-reply' );
  41. /* Always have wp_head() just before the closing </head>
  42. * tag of your theme, or you will break many plugins, which
  43. * generally use this hook to add elements to <head> such
  44. * as styles, scripts, and meta tags.
  45. */
  46. wp_head();
  47. ?>
  48. </head>
  49. <body <?php body_class(); ?>>
  50. <div id="body-container">
  51. <div id="container">
  52. <header id="page-header">
  53. <a id="logo" href="<?php bloginfo('url'); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/img/logo.png"></a>
  54. <?php
  55. function language_selector_flags(){
  56. $languages = icl_get_languages('skip_missing=0&orderby=id');
  57. //print_r($languages);
  58. if(!empty($languages)){
  59. foreach($languages as $l){
  60. echo '<a ';
  61. if($l['active']) echo 'class="active" ';
  62. echo 'href="'.$l['url'].'">';
  63. /*if ($l['language_code']=='') echo 'pl';
  64. else echo $l['language_code'];*/
  65. echo '<img src="'.$l['country_flag_url'].'" height="12" alt="'.$l['language_code'].'" width="18" />';
  66. echo '</a>';
  67. }
  68. }
  69. }
  70. ?>
  71. <div id="languages"><?php language_selector_flags(); ?></div>
  72. <?php /* Our navigation menu. If one isn't filled out, wp_nav_menu falls back to the 'starkers_menu' function which can be found in functions.php. The menu assiged to the primary position is the one used. If none is assigned, the menu with the lowest ID is used. */ ?>
  73. <?php wp_nav_menu(); ?>
  74. <?php //wp_nav_menu( array( 'container' => 'nav', 'fallback_cb' => 'starkers_menu', 'theme_location' => 'primary' ) ); ?>
  75. </header>