forked from LiveCarta/LiveCartaWP
@@ -5,6 +5,8 @@ require_once 'inc/walker-nav-menu.php';
|
||||
$urlParts = parse_url(home_url());
|
||||
$scheme = isset($urlParts['scheme']) ? $urlParts['scheme'] . '://' : '';
|
||||
|
||||
$baseTemplate = basename( get_page_template() );
|
||||
|
||||
$host = isset($urlParts['host']) ? $urlParts['host'] : '';
|
||||
if (defined('LAWCARTA_SUBDOMAIN')) {
|
||||
$hostParts = explode('.', $host);
|
||||
@@ -43,7 +45,12 @@ $lawCartaUrl = "$scheme$host$port";
|
||||
<meta name="msapplication-config" content="<?= get_theme_file_uri('/assets/img/favicon/browserconfig.xml'); ?>">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
|
||||
<?php if ($baseTemplate == 'page_home.php'):?>
|
||||
<script type="application/javascript">
|
||||
var isHomeTemplate = true;
|
||||
var lawCartaDomain = '<?= $lawCartaUrl?>';
|
||||
</script>
|
||||
<?php endif;?>
|
||||
|
||||
<?php wp_head(); ?>
|
||||
</head>
|
||||
@@ -97,6 +104,9 @@ $lawCartaUrl = "$scheme$host$port";
|
||||
$('.guest-data').css('display', 'inline-block');
|
||||
} else {
|
||||
$('.home-label').text('Dashboard').attr('href', '<?= $lawCartaUrl?>/dashboard');
|
||||
if (typeof isHomeTemplate != 'undefined' && isHomeTemplate === true) {
|
||||
window.location.href = lawCartaDomain + '/dashboard';
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user