コード例 #1
0
ファイル: mobile.php プロジェクト: nil-vn/beautysite
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 
}
コード例 #2
0
function wpmp_theme_group_uri()
{
    return get_theme_root_uri() . "/mobile_pack_base/groups/" . wpmp_theme_group();
}
コード例 #3
0
?>
" />
    <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