Created
December 13, 2012 04:12
-
-
Save mdawaffe/4273972 to your computer and use it in GitHub Desktop.
Easy AdSense Lite and Jetpack: Don't show ads (or increment the ezCount) when created "generated" excerpts from the post's content.
This file contains hidden or 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
| Index: easy-adsense-lite.php | |
| =================================================================== | |
| --- easy-adsense-lite.php (revision 638198) | |
| +++ easy-adsense-lite.php (working copy) | |
| @@ -402,6 +402,8 @@ | |
| } | |
| function ezAdSense_content($content) { | |
| + global $wp_current_filter; | |
| + if (in_array('get_the_excerpt', (array) $wp_current_filter)) 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 ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment