From 0bc9677dd1fe05c107cdc9d8fef031aacd345cef Mon Sep 17 00:00:00 2001 From: John Bintz Date: Wed, 25 Mar 2009 22:05:51 -0400 Subject: [PATCH] fix adbox visibility --- plugin-wonderful.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/plugin-wonderful.php b/plugin-wonderful.php index 4966836..43d5204 100644 --- a/plugin-wonderful.php +++ b/plugin-wonderful.php @@ -67,10 +67,12 @@ class PluginWonderful { function insert_rss_feed_ads($content) { if (is_feed()) { - foreach ($this->publisher_info->adboxes as $adbox) { - if ($adbox->in_rss_feed == 1) { - if (preg_match("##mis", $adbox->advancedcode, $matches) > 0) { - echo $matches[1]; + if ($this->publisher_info !== false) { + foreach ($this->publisher_info->adboxes as $adbox) { + if ($adbox->in_rss_feed == 1) { + if (preg_match("##mis", $adbox->advancedcode, $matches) > 0) { + echo $matches[1]; + } } } } @@ -104,8 +106,11 @@ class PluginWonderful { function inject_ads_into_body_copy($body) { if ($this->publisher_info !== false) { - return $this->publisher_info->inject_ads_into_body_copy($body, (get_option("plugin-wonderful-use-standardcode") == 1)); + if (get_option("plugin-wonderful-enable-body-copy-embedding") == 1) { + return $this->publisher_info->inject_ads_into_body_copy($body, (get_option("plugin-wonderful-use-standardcode") == 1)); + } } + return $body; } function set_up_menu() {