Skip to content

Instantly share code, notes, and snippets.

@mauriciogofas
Created July 30, 2017 07:26
Show Gist options
  • Save mauriciogofas/8924adf6c42d3f359a3a64ab56daf630 to your computer and use it in GitHub Desktop.
Save mauriciogofas/8924adf6c42d3f359a3a64ab56daf630 to your computer and use it in GitHub Desktop.
WHMCS - Include custom code in template head
<?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