'plugin-wonderful', 'description' => __('A widget for adding your Project Wonderful advertisements', 'plugin-wonderful') ); $control_options = array( 'id_base' => 'plugin-wonderful' ); $this->WP_Widget('plugin-wonderful', __('Plugin Wonderful', 'plugin-wonderful'), $widget_options, $control_options); } function widget($args, $instance) { global $plugin_wonderful; if ($plugin_wonderful->publisher_info !== false) { foreach ($plugin_wonderful->publisher_info->adboxes as $adbox) { if (($adbox->adboxid == $instance['adboxid']) || ($adbox->template_tag_id == $instance['adboxid'])) { if (get_option("plugin-wonderful-use-standardcode") == 1) { $output = $adbox->standardcode; } else { $output = $adbox->advancedcode; } if ($instance['center'] == 1) { $output = "
';
echo 'Select an adbox:
';
foreach ($plugin_wonderful->publisher_info->adboxes as $box) {
echo '";
echo "
";
}
echo '
'; echo ''; echo '
'; } } function update($new_instance, $old_instance) { $instance = $new_instance; if (!isset($instance['center'])) { $instance['center'] = 0; } return $instance; } } ?>