Created
November 8, 2019 04:13
-
-
Save zhonmaz/f41934b29760cda18a6b2905b2c698ab to your computer and use it in GitHub Desktop.
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
/* ---------------------------------------------------------------------------- | |
Type the name of the ad unit here | |
*/ | |
add_shortcode( ' your_shortcode_name ', 'your_shortcode_function_name' ); | |
function your_shortcode_function_name () { | |
if( aicp_can_see_ads() ) { // This part will show ads to your non-banned visitors | |
$adCode = '<div class="aicp"> | |
Dán mã quảng cáo Adsense vô đây ! | |
</div><!-- end of the aicp div -->'; | |
return $adCode; | |
} else { // Anything within this part will be shown to your banned visitors or to the blocked country visitors | |
return '<div class="error">You have been blocked from seeing ads.</div>'; | |
}} | |
/* ---------------------------------------------------------------------------- | |
End of code | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment