PageRenderTime 29ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

/mobile/tags/1.2/header/header-default.php

http://carrington.googlecode.com/
PHP | 102 lines | 76 code | 12 blank | 14 comment | 9 complexity | 8e06bf5350193912a71d72970bbe1631 MD5 | raw file
  1. <?php
  2. // This file is part of the Carrington Mobile Theme for WordPress
  3. // http://carringtontheme.com
  4. //
  5. // Copyright (c) 2008-2010 Crowd Favorite, Ltd. All rights reserved.
  6. // http://crowdfavorite.com
  7. //
  8. // Released under the GPL license
  9. // http://www.opensource.org/licenses/gpl-license.php
  10. //
  11. // **********************************************************************
  12. // This program is distributed in the hope that it will be useful, but
  13. // WITHOUT ANY WARRANTY; without even the implied warranty of
  14. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  15. // **********************************************************************
  16. if (__FILE__ == $_SERVER['SCRIPT_FILENAME']) { die(); }
  17. if (CFCT_DEBUG) { cfct_banner(__FILE__); }
  18. ?>
  19. <!DOCTYPE html>
  20. <html>
  21. <head>
  22. <meta http-equiv="content-type" content="<?php bloginfo('html_type') ?>; charset=<?php bloginfo('charset') ?>" />
  23. <title><?php wp_title('&laquo;', true, 'right'); bloginfo('name'); ?></title>
  24. <meta name="viewport" content="initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
  25. <link rel="stylesheet" href="<?php echo get_stylesheet_uri(); ?>" type="text/css" media="screen" charset="utf-8" />
  26. <style type="text/css">
  27. @import url(<?php echo trailingslashit(get_bloginfo('template_url')).'css/advanced.css'; ?>);
  28. </style>
  29. <script type="text/javascript">
  30. <!--
  31. <?php
  32. is_page() ? $page = 'true' : $page = 'false';
  33. echo ' CFMOBI_IS_PAGE = '.$page.';';
  34. echo " CFMOBI_PAGES_TAB = '".str_replace("'", "\'", __('Pages', 'carrington-mobile'))."';";
  35. echo " CFMOBI_POSTS_TAB = '".str_replace("'", "\'", __('Recent Posts', 'carrington-mobile'))."';";
  36. global $cfmobi_touch_browsers;
  37. if (!isset($cfmobi_touch_browsers) || !is_array($cfmobi_touch_browsers)) {
  38. $cfmobi_touch_browsers = array(
  39. 'iPhone',
  40. 'iPod',
  41. 'Android',
  42. 'BlackBerry9530',
  43. 'LG-TU915 Obigo', // LG touch browser
  44. 'LGE VX',
  45. 'webOS', // Palm Pre, etc.
  46. );
  47. }
  48. if (count($cfmobi_touch_browsers)) {
  49. $touch = array();
  50. foreach ($cfmobi_touch_browsers as $browser) {
  51. $touch[] = str_replace('"', '\"', trim($browser));
  52. }
  53. ?>
  54. var CFMOBI_TOUCH = ["<?php echo implode('","', $touch); ?>"];
  55. for (var i = 0; i < CFMOBI_TOUCH.length; i++) {
  56. if (navigator.userAgent.indexOf(CFMOBI_TOUCH[i]) != -1) {
  57. document.write('<?php echo str_replace('/', '\/', '<link rel="stylesheet" href="'.trailingslashit(get_bloginfo('template_url')).'css/touch.css" type="text/css" media="screen" charset="utf-8" />'); ?>');
  58. break;
  59. }
  60. }
  61. <?php
  62. }
  63. ?>
  64. document.write('<?php
  65. ob_start();
  66. wp_print_scripts();
  67. $wp_scripts = ob_get_contents();
  68. ob_end_clean();
  69. echo trim(str_replace(
  70. array("'", "\n", '/'),
  71. array("\'", '', '\/'),
  72. $wp_scripts
  73. ));
  74. ?>');
  75. //--></script>
  76. <?php do_action('cfmobi_wp_head'); ?>
  77. </head>
  78. <body<?php if(is_single() || is_page()) {echo '';} else { echo ' id="is-list"';} ?>>
  79. <h1 id="site-name"><a rel="home" href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1>
  80. <hr />
  81. <p id="navigation-top" class="navigation">
  82. <?php cfct_misc('main-nav'); ?>
  83. </p>
  84. <hr />