| Server IP : 118.139.160.155 / Your IP : 216.73.217.176 Web Server : Apache System : Linux sg2plmcpnl504228.prod.sin2.secureserver.net 4.18.0-553.124.4.lve.el8.x86_64 #1 SMP Fri May 15 13:02:13 UTC 2026 x86_64 User : twll3xqyaqrh ( 9725459) PHP Version : 5.6.40 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/twll3xqyaqrh/public_html/Site WP/wp-content/uploads/custom-css-js/ |
Upload File : |
<!-- start Simple Custom CSS and JS -->
<script type="text/javascript">
jQuery(document).ready(function( $ ){
const slug = window.location.href.split("documentation/")[1].replace("/",""); //the last replace is incase there is a slash at the end
$.ajax({
url:window.location.origin+'/wp-json/wp/v2/documentation?slug='+slug+'&_fields=acf.lien_du_fichier',
success:function(xhr){
//console.log(xhr[0].acf.lien_du_fichier);
$("#dl-btn").html('<span class="btn-title">Télécharger</span>');
$("#dl-btn").attr('href',xhr[0].acf.lien_du_fichier);
},
error:function(){
$("#dl-btn").remove();
$("#dl-btn-wrapper").append("Erreur de connexion. <a href='./'>Reéssayer...</a>")
}
})
const src = $(".main-image-box figure img")[0].src;
$(".main-image-box figure").remove();
$(".main-image-box").prepend('<div class="d-flex flex-column align-items-center"> <img style="height:auto;width:100%" src="'+src+'"> <br/><div class="d-flex flex-column flex-grow-1 mx-5"><strong id="dl-btn-wrapper"><a id="dl-btn" class=" btn-small wpcf7-form-control wpcf7-submit theme-btn btn-style-one"><span>Patientez...</span></a></strong></div></div>');
const outside = $(".main-image-box").html();
$(".main-image-box").remove();
const internal = $(".post-details").html();
$(".post-details").html('<div class="row"><div class="col-sm-12 col-md-3">'+outside+'</div><div class="col-sm-12 col-md-9">'+internal+'</div></div>');
});
</script>
<!-- end Simple Custom CSS and JS -->