forked from LiveCarta/LiveCartaWP
LAW-2553
This commit is contained in:
@@ -5,6 +5,8 @@ require_once 'inc/walker-nav-menu.php';
|
|||||||
$urlParts = parse_url(home_url());
|
$urlParts = parse_url(home_url());
|
||||||
$scheme = isset($urlParts['scheme']) ? $urlParts['scheme'] . '://' : '';
|
$scheme = isset($urlParts['scheme']) ? $urlParts['scheme'] . '://' : '';
|
||||||
|
|
||||||
|
$baseTemplate = basename( get_page_template() );
|
||||||
|
|
||||||
$host = isset($urlParts['host']) ? $urlParts['host'] : '';
|
$host = isset($urlParts['host']) ? $urlParts['host'] : '';
|
||||||
if (defined('LAWCARTA_SUBDOMAIN')) {
|
if (defined('LAWCARTA_SUBDOMAIN')) {
|
||||||
$hostParts = explode('.', $host);
|
$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="msapplication-config" content="<?= get_theme_file_uri('/assets/img/favicon/browserconfig.xml'); ?>">
|
||||||
<meta name="theme-color" content="#ffffff">
|
<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(); ?>
|
<?php wp_head(); ?>
|
||||||
</head>
|
</head>
|
||||||
@@ -82,6 +89,9 @@ $lawCartaUrl = "$scheme$host$port";
|
|||||||
$('.guest-data').css('display', 'inline-block');
|
$('.guest-data').css('display', 'inline-block');
|
||||||
} else {
|
} else {
|
||||||
$('.home-label').text('Dashboard').attr('href', '<?= $lawCartaUrl?>/dashboard');
|
$('.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