Created
July 30, 2017 07:26
-
-
Save mauriciogofas/8924adf6c42d3f359a3a64ab56daf630 to your computer and use it in GitHub Desktop.
WHMCS - Include custom code in template head
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Include custom code in template head | |
* © 2017 gofas.net | |
* | |
*/ | |
add_hook( 'ClientAreaHeadOutput', 1, function( $vars ) { | |
$gofas_js_css = array(); | |
$gofas_js_css['gofas_js_css'] =' | |
<script type="text/javascript"> | |
// Código JavaScript personalizado aqui (código de integração do Google Analytics por exemplo) | |
</script> | |
<script src="https://exemplo.com/javascript/custom.js"></script> | |
<link href="https://exemplo.com/custom.css" rel="stylesheet"> | |
'; | |
return $gofas_js_css['gofas_js_css']; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment