forked from LiveCarta/LiveCartaWP
@@ -176,7 +176,7 @@ function getFaaTaxonomyIds()
|
|||||||
$tIds = [];
|
$tIds = [];
|
||||||
foreach ($posts as $post) {
|
foreach ($posts as $post) {
|
||||||
$taxonomies = get_the_terms($post, 'fac_category_type');
|
$taxonomies = get_the_terms($post, 'fac_category_type');
|
||||||
if (count($taxonomies) > 0) {
|
if (is_countable($taxonomies) && count($taxonomies) > 0) {
|
||||||
foreach ($taxonomies as $taxonomy) {
|
foreach ($taxonomies as $taxonomy) {
|
||||||
if (!in_array($taxonomy->term_id, $tIds)) {
|
if (!in_array($taxonomy->term_id, $tIds)) {
|
||||||
$tIds[] = $taxonomy->term_id;
|
$tIds[] = $taxonomy->term_id;
|
||||||
@@ -226,6 +226,8 @@ function get_lawcarta_url(){
|
|||||||
}
|
}
|
||||||
$host = implode('.', $hostParts);
|
$host = implode('.', $hostParts);
|
||||||
//Fix for staging env because of it use same domain carta.live for both lawcarta/livecarta
|
//Fix for staging env because of it use same domain carta.live for both lawcarta/livecarta
|
||||||
|
|
||||||
|
if (isset($wp_sub_domain)) {
|
||||||
if(LAWCARTA_ENVIRONMENT_NAME == 'staging' && $wp_sub_domain == 'staging-live'){
|
if(LAWCARTA_ENVIRONMENT_NAME == 'staging' && $wp_sub_domain == 'staging-live'){
|
||||||
$host = str_replace('staging-law', 'staging-live',$host);
|
$host = str_replace('staging-law', 'staging-live',$host);
|
||||||
}
|
}
|
||||||
@@ -238,6 +240,7 @@ function get_lawcarta_url(){
|
|||||||
$host = str_replace('app-law', 'app',$host);
|
$host = str_replace('app-law', 'app',$host);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$port = isset($urlParts['port']) ? $urlParts['port'] : '';
|
$port = isset($urlParts['port']) ? $urlParts['port'] : '';
|
||||||
if (defined('LAWCARTA_PORT')) {
|
if (defined('LAWCARTA_PORT')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user