-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
50 lines (40 loc) · 1.05 KB
/
header.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
include(TEMPLATEPATH."/inc/InitData.php");
$d = new iniData();
if(wp_title('', false)) {
$title = get_the_title();
$title .= ' :';
}
$title .= get_bloginfo('name');
$bodyClass = get_body_class()[0].' '. get_body_class()[1].' '.get_body_class()[2].' '.get_body_class()[3].' '.get_body_class()[4].' '.get_body_class()[5];
$headerContent = file_get_contents($d::$themeDir."/public/header.html");
$field = array(
"{lang}",
"{html_type}",
"{charset}",
"{cs-1}",
"{cs-2}",
"{siteTitle}",
"{titlePegeLocation}",
"{homeUrl}",
"{siteDescription}",
"{bodyclass}",
"{nemu}"
);
$remplaceField = array(
get_bloginfo('language'),
get_bloginfo('html_type'),
get_bloginfo('charset'),
$d::$cssStyle,
$d::$cssDir."/ccsadd.css",
get_bloginfo('name'),
$title,
get_bloginfo('home'),
get_bloginfo('description'),
$bodyClass,
wp_nav_menu()
);
$headerContent = str_replace($field, $remplaceField, $headerContent);
//add header script and css
wp_head();
echo $headerContent;