-
Notifications
You must be signed in to change notification settings - Fork 62
/
header.php
89 lines (70 loc) · 4.71 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
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
<!doctype html>
<html class="no-js" <?php language_attributes(); ?>>
<head>
<meta charset="utf-8">
<!-- Force IE to use the latest rendering engine available -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Mobile Meta -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta class="foundation-mq">
<!-- If Site Icon isn't set in customizer -->
<?php if ( ! function_exists( 'has_site_icon' ) || ! has_site_icon() ) { ?>
<meta name="apple-mobile-web-app-title" content="Disciple.Tools">
<meta name="application-name" content="Disciple.Tools">
<link rel="apple-touch-icon" sizes="180x180" href="<?php echo esc_url( get_template_directory_uri() ); ?>/dt-assets/favicons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="<?php echo esc_url( get_template_directory_uri() ); ?>/dt-assets/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="<?php echo esc_url( get_template_directory_uri() ); ?>/dt-assets/favicons/favicon-16x16.png">
<link rel="manifest" href="<?php echo esc_url( get_template_directory_uri() ); ?>/dt-assets/favicons/site.webmanifest">
<link rel="mask-icon" href="<?php echo esc_url( get_template_directory_uri() ); ?>/dt-assets/favicons/safari-pinned-tab.svg" color="#3f729b">
<link rel="shortcut icon" href="<?php echo esc_url( get_template_directory_uri() ); ?>/dt-assets/favicons/favicon.ico">
<meta name="msapplication-TileColor" content="#3f729b">
<meta name="msapplication-TileImage" content="<?php echo esc_url( get_template_directory_uri() ); ?>/dt-assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="<?php echo esc_url( get_template_directory_uri() ); ?>/dt-assets/favicons/browserconfig.xml">
<meta name="theme-color" content="#3f729b">
<?php } ?>
<title>
<?php
$instance_name = get_bloginfo( 'name' );
if ( is_single() ) {
$post_type_key = get_post_type();
if ( DT_Posts::can_view( get_post_type(), GET_THE_ID() ) ){
$post_type_label = isset( $post_type_settings['label_plural'] ) ? $post_type_settings['label_plural'] : $post_type_key;
$title_string = single_post_title( '' ) . ' - ' . ucwords( $post_type_label );
echo esc_html( $title_string . ' - ' .$instance_name );
} else {
echo esc_html( __( 'D.T Record', 'disciple_tools' ) );
}
} else if ( is_archive() ){
echo post_type_archive_title();
} else {
$title_string = str_replace( '/', ' - ', untrailingslashit( dt_get_url_path( true ) ) );
$post_type_settings = apply_filters( 'dt_get_post_type_settings', [], $title_string );
$label = isset( $post_type_settings['label_plural'] ) ? $post_type_settings['label_plural'] : ucwords( $title_string );
echo esc_html( $label . ' - ' . $instance_name );
}
?>
</title>
<?php wp_head(); ?>
</head>
<!-- Uncomment this line if using the Off-Canvas Menu -->
<body <?php body_class(); ?>>
<div class="off-canvas-wrapper">
<?php get_template_part( 'dt-assets/parts/nav', 'offcanvas' ); ?>
<div class="off-canvas-content" data-off-canvas-content>
<header class="header" role="banner">
<!-- This navs will be applied to the topbar, above all content
To see additional nav styles, visit the /parts directory -->
<?php get_template_part( 'dt-assets/parts/nav', 'topbar' ); ?>
</header> <!-- end .header -->
<noscript>
<header class="header"><?php esc_html_e( 'Javascript must be enabled for this site to function correctly.', 'disciple_tools' ); ?></header>
</noscript>
<div id="js-missing-required-browser-features-notice" hidden>
<header class="header">
<br><br><br>
<?php esc_html_e( 'You seem to be using an out-of-date web browser. Without the most up-to-date version of your browser, this may site may not function correctly. Please note that Internet Explorer is not supported.', 'disciple_tools' ); ?>
<a href="https://whatbrowser.org" rel="">
<?php esc_html_e( 'See what browser you are using.', 'disciple_tools' ); ?>
</a>
</header>
</div>