options['text_widget'] = EzGA::handleDefaultText($plg->options['text_widget'], '160x600'); $ezMax = EzGA::$options['max_count']; if ($plg->ezCount() < $ezMax) { return $plg->mkAdBlock("widget"); } } function getTitle() { $plg = self::$plg; if (!empty($plg->options['kill_widget_title'])) { return; } if (empty($plg->options['title_widget'])) { $title = __('Sponsored Links', 'easy-adsenser'); } else { $title = stripslashes(htmlspecialchars($plg->options['title_widget'])); } return $title; } function decorate($adText) { if (!empty($adText)) { echo "
\n"; } } } add_action('widgets_init', create_function('', 'return register_widget("EzAdsWidget");')); class EzAdsSearch extends EzWidget { function __construct() { parent::__construct("EzAdsSearch", "Easy AdSense: Google Search"); } function getAdText() { $plg = self::$plg; EzGA::preFilter("", true); if (EzGA::$noAds) { return; } $plg->options['text_gsearch'] = EzGA::handleDefaultText($plg->options['text_gsearch'], '200x90'); $metaOptions = EzGA::getMetaOptions(); if (isset($metaOptions['adsense']) && $metaOptions['adsense'] == 'no') { return; } $title_gsearch = $metaOptions['title_gsearch']; if ($title_gsearch == 'no') { return; } if (!empty($plg->options['kill_linebreaks'])) { $linebreak = ""; } else { $linebreak = "\n"; } $margin = $plg->options['margin_gsearch']; if (!empty($plg->options['kill_inline'])) { $inline = ''; } else { $inline = "style='margin:{$margin}px;'"; } $text = stripslashes("
";
}
else if ($title_gsearch == 'light') {
$title = "
";
}
else if ($title_gsearch == 'customized') {
$title = $plg->options['title_gsearch_custom'];
}
}
return $title;
}
function decorate($adText) {
if (!empty($adText)) {
echo "