Created
February 18, 2014 19:54
-
-
Save webzunft/9078689 to your computer and use it in GitHub Desktop.
Sample code for an adblocker check based on BlockAlyzer for WordPress
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
function adblock_alert(){ | |
?><script type="text/javascript"> | |
jQuery(document).ready(function($) { | |
setTimeout(function(){ | |
if ( ba_blocked == true ) alert("You are using adblock."); | |
},200) | |
}); | |
</script><?php | |
} | |
add_action('wp_footer', 'adblock_alert'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment