public
Created

Easy AdSense Lite and Jetpack: Don't show ads (or increment the ezCount) unless we're in the loop.

  • Download Gist
option-1-in-the-loop.diff
Diff
1 2 3 4 5 6 7 8 9 10 11 12
Index: easy-adsense-lite.php
===================================================================
--- easy-adsense-lite.php (revision 638198)
+++ easy-adsense-lite.php (working copy)
@@ -402,6 +402,7 @@
}
function ezAdSense_content($content) {
+ if (!in_the_loop()) return $content ;
if (!$this->options['allow_feeds'] && is_feed()) return $content ;
if ($this->options['kill_pages'] && is_page()) return $content ;
if ($this->options['kill_attach'] && is_attachment()) return $content ;

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.