1 Star 4 Fork 1

gallanthunter/wp-theme-beginner

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
header.php 3.38 KB
一键复制 编辑 原始数据 按行查看 历史
gallanthunter 提交于 2023-02-08 21:35 . 更新tag,归档显示样式
<?php
/*
* @Filename : header.php
* @Description :
* @Author : Zhang Zhijun <gallanthunter@163.com>
* @Copyright : Copyright (c) 2022 by chahuawu.com, All Rights Reserved.
* @License : Mulan PubL v2
* @Link : https://chahuawu.com
* @CreateTime : 2022-12-17 20:57:23
* @LastModifyTime: 2023-02-08 20:15:19
*/
?>
<!DOCTYPE HTML>
<html xmlns:wb="http://open.weibo.com/wb" lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,IE=10,IE=9,IE=8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<link href="/favicon.ico" rel="icon" type="image/x-icon" />
<?php if (is_single() || is_home()) : ?>
<meta name="robots" content="index,follow" />
<?php else : ?>
<meta name="robots" content="noindex,follow" />
<?php endif; ?>
<meta property="og:author" content="<?php the_author_meta('display_name', $post->post_author); ?>" />
<?php wp_head(); ?>
<title>
<?php wp_title('' . bgn_get_option('bgn_divide') . '', true, 'right');
echo get_option('blogname');
if (is_home() || is_front_page()) echo ' - ', get_option('blogdescription');
if ($paged > 1) echo '-Page ', $paged; ?>
</title>
<!--[if lt IE 9]><script src="https://cdn.bootcss.com/html5shiv/r29/html5.min.js"></script><![endif]-->
<script>
var ajax = {
get: function(t, e) {
var s = new XMLHttpRequest || new ActiveXObject("Microsoft,XMLHTTP");
s.open("GET", t, !0), s.onreadystatechange = function() {
(4 == s.readyState && 200 == s.status || 304 == s.status) && e.call(this, s.responseText)
}, s.send()
},
post: function(t, e, s) {
var n = new XMLHttpRequest || new ActiveXObject("Microsoft,XMLHTTP");
n.open("POST", t, !0), n.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), n.onreadystatechange = function() {
4 != n.readyState || 200 != n.status && 304 != n.status || s.call(this, n.responseText)
}, n.send(e)
}
};
function setCookie(e, t, o) {
var i = new Date;
i.setDate(i.getDate() + o), document.cookie = e + "=" + escape(t) + (null == o ? "" : ";expires=" + i.toGMTString())
};
function getCookie(e) {
var t, n = new RegExp("(^| )" + e + "=([^;]*)(;|$)");
return (t = document.cookie.match(n)) ? t[2] : null
};
</script>
</head>
<?php flush(); ?>
<body class="bgn-font-serif bgn-text-gray-600 bgn-bg-gray-100">
<header class="bgn-flex bgn-flex-col bgn-py-4 bgn-justify-center bgn-bg-white">
<!-- logo -->
<div class="">
<img class="bgn-w-96 bgn-mx-auto bgn-fill-current bgn-text-blue-500" src="<?php echo BEGINNER_URL ?>/assets/images/logo.svg">
</div>
<!-- menu -->
<nav class="bgn-header-menu">
<?php wp_nav_menu(array(
'container' => false,
'theme_location' => 'header-menu',
'items_wrap' => '<ul class="bgn-header-menu-items">%3$s</ul>',
)); ?>
</nav>
</header>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/gallanthunter/wp-theme-beginner.git
git@gitee.com:gallanthunter/wp-theme-beginner.git
gallanthunter
wp-theme-beginner
wp-theme-beginner
master

搜索帮助