-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathheader.php
More file actions
executable file
·167 lines (150 loc) · 8.29 KB
/
header.php
File metadata and controls
executable file
·167 lines (150 loc) · 8.29 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<?php if(is_front_page()) { ?>
<title><?php echo get_bloginfo('name'); ?> | <?php the_title(); ?></title>
<meta name="description" content="IJME is a comprehensive, open access, platform for discussions on bioethics, medical ethics, and healthcare justice in India and the developing world." />
<?php } else if (get_post_type() == "issues") {?>
<title>Issues | <?php echo get_bloginfo('name');?> </title>
<meta name="description" content="<?php the_title(); ?>" />
<?php
} else { ?>
<title><?php the_title(); ?> | <?php echo get_bloginfo('name'); ?> </title>
<meta name="description" content="<?php the_title(); ?>" />
<?php } ?>
<!-- Bootstrap -->
<!--<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">-->
<?php $url='http://'.$uri = $_SERVER['HTTP_HOST'];
if($url=="http://ijme.in"){ }else{ ?>
<meta name="robots" content="noindex, nofollow">
<?php if(is_front_page()){ ?>
<link rel="canonical" href="http://ijme.in/"/>
<?php }else{ ?>
<link rel="canonical" href="http://ijme.in<?php echo $_SERVER['REQUEST_URI'] ?>"/>
<?php } ?>
<?php } ?>
<?php wp_head(); ?>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<script>
function hover(element,fileName) {
let link = '<?php echo THEME_URL; ?>/images/header-social-media/hover/'+fileName;
element.setAttribute('src', link);
}
function unhover(element,fileName) {
let link = '<?php echo THEME_URL; ?>/images/header-social-media/'+fileName;
element.setAttribute('src', link);
}
</script>
<?php $site_url = 'http://' . $_SERVER['HTTP_HOST'] . '/';
if (($site_url == "http://ijme.in/") || ($site_url == "http://www.ijme.in/")) {
if (is_singular('articles')) {
$this_post = get_queried_object();
$catList = get_the_category($this_post->ID);
$tags = wp_get_post_tags($this_post->ID);
$categoryDimension = "";
foreach ($catList as $single) {
$categoryDimension = $categoryDimension . " " . $single->cat_name . " ";
}
$term_obj_list = get_the_terms($this_post->ID, 'topic');
$terms_string = " ";
if ($term_obj_list) {
$terms_string = join(' , ', wp_list_pluck($term_obj_list, 'name')) . " ";
}
}
?>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-42369332-1', 'auto');
<?php
if(is_singular('articles'))
{?>
ga('set', 'dimension1', '<?php echo $categoryDimension; ?>');
<?php
if ($terms_string != " ") {?>
ga('set', 'dimension2', '<?php echo $terms_string; ?>');
<?php } ?>
<?php } ?>
ga('send', 'pageview');
</script>
<?php } ?>
</head>
<body>
<div>
<div class="row background-white header-shadow custom-navigation-header">
<div class="i-header-logo dp-flex align-items-center">
<a href="<?php echo site_url(); ?>"><img src="<?php echo THEME_URL; ?>/images/logo.png"
alt="Page Header"></a>
<div id="home-page-label">HOME</div>
</div>
<div class="nav-menu-wrapper">
<div style="display: flex;width: 100%">
<?php require 'nav.php'; ?>
<div class="search-wrapper-fullscreen">
<form method="get" action="
<?php echo site_url(); ?>" id="searchform" class="search-form" role="search">
<div class="input-group add-on">
<input class="form-control" placeholder="Search" name="s" id="srch-term" type="text">
<div class="input-group-btn">
<button class="btn search-submit" type="submit"/>
</div>
</div>
</form>
</div>
<div class="header-social-media-wrapper">
<a href="https://www.facebook.com/ijme.editorial"
target="_blank">
<img width="18" src="<?php echo THEME_URL; ?>/images/header-social-media/facebook-f.svg"
onmouseover="hover(this,'facebook-f.svg');"
onmouseout="unhover(this,'facebook-f.svg')"
alt="Page Header">
</a>
<a href="https://twitter.com/IndJMedEthics" target="_blank">
<img width="18" src="<?php echo THEME_URL; ?>/images/header-social-media/twitter.svg"
onmouseover="hover(this,'twitter.svg');"
onmouseout="unhover(this,'twitter.svg')"
alt="Page Header">
</a>
<a href="https://www.linkedin.com/in/indian-journal-of-medical-ethics/" target="_blank">
<img width="18" src="<?php echo THEME_URL; ?>/images/header-social-media/linkedin-in.svg"
onmouseover="hover(this,'linkedin-in.svg');"
onmouseout="unhover(this,'linkedin-in.svg')"
alt="Page Header">
</a>
</div>
</div>
<div class="search-wrapper-mobile">
<form method="get" action="
<?php echo site_url(); ?>" id="searchform" class="search-form" role="search">
<div class="input-group add-on">
<input class="form-control" placeholder="Search" name="s" id="srch-term" type="text">
<div class="input-group-btn">
<button class="btn search-submit" type="submit"/>
</div>
</div>
</form>
</div>
<div class="nav-about-wrapper" >
<p class="nav-about-journal-text">
A Journal of Healthcare Ethics & Humanities. Published since 1993 by Forum for Medical Ethics
Society. <br/> Peer-reviewed. Indexed in Medline, PubMed, The Philosopher’s Index, Scopus.
</p>
</div>
<div class="nav-logo-text">
<span>ISSN: 0975-5691 (Online);</span>
<span>0974-8466 (Print)</span>
<span>RNI Reg No. MAHENG/2016/67188</span>
</div>
</div>
</div>