Browse Source

Remove Facebook fbclid

Branche10.4
fredtempez 5 months ago
parent
commit
78e6dd7adc
  1. 7
      core/core.js.php
  2. 11
      core/core.php

7
core/core.js.php

@ -472,4 +472,11 @@ $(document).ready(function(){
$(changeIcon).addClass('zwiico-menu');
};
});
/**
* Remove ID Facebook from URL
*/
if(/^\?fbclid=/.test(location.search))
location.replace(location.href.replace(/\?fbclid.+/, ""));
});

11
core/core.php

@ -561,7 +561,16 @@ class common {
// Une partie de l'url
else {
$url = explode('/', $this->url);
return array_key_exists($key, $url) ? $url[$key] : null;
if (array_key_exists($key, $url) ) {
if (strpos($url[$key],'fbclid=') === false) {
$result = $url[$key];
} else {
$result = $key === 0 ? $this->getData(['config','homePageId']) : '';
}
} else {
$result = null;
}
return $result;
}
}

Loading…
Cancel
Save