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