forked from LiveCarta/LiveCartaWP
LAW-2639
This commit is contained in:
@@ -182,3 +182,32 @@ function my_filter_post_where( $where) {
|
|||||||
|
|
||||||
return $where;
|
return $where;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_lawcarta_url(){
|
||||||
|
$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);
|
||||||
|
if (count($hostParts) === 3) {
|
||||||
|
array_shift($hostParts);
|
||||||
|
}
|
||||||
|
if (!empty(LAWCARTA_SUBDOMAIN)) {
|
||||||
|
array_unshift($hostParts, LAWCARTA_SUBDOMAIN);
|
||||||
|
}
|
||||||
|
$host = implode('.', $hostParts);
|
||||||
|
}
|
||||||
|
|
||||||
|
$port = isset($urlParts['port']) ? $urlParts['port'] : '';
|
||||||
|
if (defined('LAWCARTA_PORT')) {
|
||||||
|
$port = LAWCARTA_PORT;
|
||||||
|
}
|
||||||
|
if (!empty($port)) {
|
||||||
|
$port = ':' . $port;
|
||||||
|
}
|
||||||
|
|
||||||
|
return "$scheme$host$port";
|
||||||
|
}
|
||||||
@@ -2,33 +2,6 @@
|
|||||||
|
|
||||||
require_once 'inc/walker-nav-menu.php';
|
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);
|
|
||||||
if (count($hostParts) === 3) {
|
|
||||||
array_shift($hostParts);
|
|
||||||
}
|
|
||||||
if (!empty(LAWCARTA_SUBDOMAIN)) {
|
|
||||||
array_unshift($hostParts, LAWCARTA_SUBDOMAIN);
|
|
||||||
}
|
|
||||||
$host = implode('.', $hostParts);
|
|
||||||
}
|
|
||||||
|
|
||||||
$port = isset($urlParts['port']) ? $urlParts['port'] : '';
|
|
||||||
if (defined('LAWCARTA_PORT')) {
|
|
||||||
$port = LAWCARTA_PORT;
|
|
||||||
}
|
|
||||||
if (!empty($port)) {
|
|
||||||
$port = ':' . $port;
|
|
||||||
}
|
|
||||||
|
|
||||||
$lawCartaUrl = "$scheme$host$port";
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html <?php language_attributes(); ?>>
|
<html <?php language_attributes(); ?>>
|
||||||
@@ -48,7 +21,7 @@ $lawCartaUrl = "$scheme$host$port";
|
|||||||
<?php if ($baseTemplate == 'page_home.php'):?>
|
<?php if ($baseTemplate == 'page_home.php'):?>
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
var isHomeTemplate = true;
|
var isHomeTemplate = true;
|
||||||
var lawCartaDomain = '<?= $lawCartaUrl?>';
|
var lawCartaDomain = '<?= get_lawcarta_url()?>';
|
||||||
</script>
|
</script>
|
||||||
<?php endif;?>
|
<?php endif;?>
|
||||||
|
|
||||||
|
|||||||
@@ -93,8 +93,8 @@ if ($tIds !== false) {
|
|||||||
<div class="cont">
|
<div class="cont">
|
||||||
<div class="sb-head">Interested? Get to know more</div>
|
<div class="sb-head">Interested? Get to know more</div>
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<a href="#" class="button xxl mp-top-right">Request a demo</a>
|
<a href="/contact-us" class="button xxl mp-top-right">Request a demo</a>
|
||||||
<a href="#" class="button xxl mp-top-left">Sign Up For Free</a>
|
<a href="<?= get_lawcarta_url()?>/user/registration" class="button xxl mp-top-left">Sign Up For Free</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -102,5 +102,5 @@ if ($tIds !== false) {
|
|||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
get_footer();
|
get_footer();
|
||||||
|
get_site_url();
|
||||||
|
|
||||||
|
|||||||
@@ -43,8 +43,8 @@ $post = $posts[0];
|
|||||||
<div class="cont">
|
<div class="cont">
|
||||||
<div class="sb-head">Interested? Get to know more</div>
|
<div class="sb-head">Interested? Get to know more</div>
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<a href="#" class="button xxl mp-top-right">Request a demo</a>
|
<a href="/contact-us" class="button xxl mp-top-right">Request a demo</a>
|
||||||
<a href="#" class="button xxl mp-top-left">Sign Up For Free</a>
|
<a href="<?= get_lawcarta_url()?>/user/registration" class="button xxl mp-top-left">Sign Up For Free</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user