Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Sample code for an adblocker check based on BlockAlyzer for WordPress
function adblock_alert(){
?><script type="text/javascript">
jQuery(document).ready(function($) {
if ( ba_blocked == true ) alert("You are using adblock.");
add_action('wp_footer', 'adblock_alert');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment