Beispiel #1
0
function wpmp_ms_mobile_top($title, $menu = array())
{
    print "<?xml version='1.0' encoding='UTF-8'?>";
    //defend against old, confused or custom mobile themes
    include_once get_theme_root() . DIRECTORY_SEPARATOR . 'mobile_pack_base' . DIRECTORY_SEPARATOR . 'functions.php';
    if (!function_exists('wpmp_theme_group_file')) {
        function wpmp_theme_group_file($file = 'index.php')
        {
            return 'none';
        }
        function wpmp_theme_base_style()
        {
            return get_bloginfo('stylesheet_url');
        }
        function wpmp_theme_group()
        {
            return 'none';
        }
    }
    if (file_exists($wpmp_include = wpmp_theme_group_file('header.php'))) {
        include_once $wpmp_include;
    } else {
        ?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.1//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head profile="http://gmpg.org/xfn/11">
      <?php 
        if (get_bloginfo('stylesheet_url') != wpmp_theme_base_style()) {
            ?>
        <link href="<?php 
            print wpmp_theme_base_style();
            ?>
" rel="stylesheet" type="text/css" />
      <?php 
        }
        ?>
      <link href="<?php 
        bloginfo('stylesheet_url');
        ?>
" rel="stylesheet" type="text/css" />
      <link href="<?php 
        print get_theme_root_uri();
        ?>
/mobile_pack_base/style_structure.css" rel="stylesheet" type="text/css" />
    <?php 
    }
    ?>
    <meta http-equiv="Content-Type" content="<?php 
    bloginfo('html_type');
    ?>
; charset=<?php 
    bloginfo('charset');
    ?>
" />
    <title><?php 
    bloginfo('name');
    ?>
 <?php 
    print $title;
    ?>
</title>
    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php 
    bloginfo('rss2_url');
    ?>
" />
    <link rel="alternate" type="text/xml" title="RSS .92" href="<?php 
    bloginfo('rss_url');
    ?>
" />
    <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php 
    bloginfo('atom_url');
    ?>
" />
    <link rel="pingback" href="<?php 
    bloginfo('pingback_url');
    ?>
" />
    <?php 
    wp_head();
    ?>
  </head>
  <body class="<?php 
    if ($wpmp_theme_group = wpmp_theme_group()) {
        print $wpmp_theme_group;
    } else {
        print 'base';
    }
    ?>
">
    <div id="wrap">
      <div id="header" style='height:auto'>
        <p><a href="<?php 
    echo get_option('home');
    ?>
/"><strong><?php 
    bloginfo('name');
    ?>
</strong></a></p>
        <p><?php 
    bloginfo('description');
    ?>
</p>
      </div>
      <?php 
    if ($menu) {
        $base = get_option('home');
        print '<div id="menu"><ul class="breadcrumbs">';
        $page = $_SERVER['REQUEST_URI'];
        if (substr($page, -9) == "/wp-admin") {
            $page = "{$base}/wp-admin/index.php";
        }
        foreach ($menu as $name => $link) {
            $item = '<li class="';
            if (strpos(strtolower($page), strtolower($link)) !== false) {
                $item .= 'current_';
                $title = substr($name, $name[0] == '_' ? 1 : 0);
            }
            if (substr($link, 0, 7) != "http://" && substr($link, 0, 8) != "https://") {
                $link = $base . $link;
            }
            $item .= 'page_item"><a href="' . $link . '" title="' . $name . '">' . __($name, 'wpmp') . '</a></li> ';
            if ($name[0] != '_') {
                print $item;
            }
        }
        print '</ul></div>';
    }
    ?>
      <div id="wrapper">
        <div id="content">
          <h1><?php 
    print $title;
    ?>
</h1>
          <?php 
}
    ?>
      <link href="<?php 
    print $base_style;
    ?>
" rel="stylesheet" type="text/css" />
    <?php 
}
?>
    <link href="<?php 
bloginfo('stylesheet_url');
?>
" rel="stylesheet" type="text/css" />
    <link href="<?php 
print wpmp_theme_group_uri();
?>
/styles/baseStyles-mid.css" rel="stylesheet" type="text/css" />
    <?php 
if (get_bloginfo('stylesheet_url') != ($wpmp_base_style = wpmp_theme_base_style())) {
    ?>
      <link href="<?php 
    print $wpmp_base_style;
    ?>
.nokia.css" rel="stylesheet" type="text/css" />
    <?php 
}
?>
    <link href="<?php 
bloginfo('stylesheet_url');
?>
.nokia.css" rel="stylesheet" type="text/css" />
header('Content-Type: text/html; charset=' . get_bloginfo('charset'));
header('Vary: user-agent, accept');
header('Cache-Control: no-cache, no-transform');
print '<?xml version="1.0" encoding="UTF-8"?>';
if (file_exists($wpmp_include = wpmp_theme_group_file('header.php'))) {
    include_once $wpmp_include;
} else {
    ?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.1//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile11.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
  <head profile="http://gmpg.org/xfn/11">
    <?php 
    if (get_bloginfo('stylesheet_url') != wpmp_theme_base_style()) {
        ?>
      <link href="<?php 
        print wpmp_theme_base_style();
        ?>
" rel="stylesheet" type="text/css" />
    <?php 
    }
    ?>
    <link href="<?php 
    bloginfo('stylesheet_url');
    ?>
" rel="stylesheet" type="text/css" />
    <link href="<?php 
    print get_theme_root_uri();
    ?>
/mobile_pack_base/style_structure.css" rel="stylesheet" type="text/css" />
  <?php 
}