Last active
February 16, 2017 13:30
-
-
Save cleberoliveira/ccaf6e36e278565cbcbff62ac619d40a to your computer and use it in GitHub Desktop.
Simples WordPress plugin que adiciona código Google AdSense no header.
This file contains 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 | |
/* | |
Plugin Name: Meu Código AdSense | |
Description: Ativa meu código adsense no site. | |
*/ | |
function meu_cod_adsense() { ?> | |
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> | |
<script> | |
(adsbygoogle = window.adsbygoogle || []).push({ | |
google_ad_client: "ca-pub-1518857307023639", | |
enable_page_level_ads: true | |
}); | |
</script> | |
<?php } | |
add_action( 'wp_head', 'meu_cod_adsense', 10 ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment