some cleanup work

This commit is contained in:
John Bintz 2009-07-06 19:57:48 -04:00
parent 57ec132f90
commit 3bd990e86f

View File

@ -22,8 +22,6 @@ class PluginWonderful {
} }
function _setup_actions() { function _setup_actions() {
global $wp_version;
add_action('admin_menu', array($this, 'set_up_menu')); add_action('admin_menu', array($this, 'set_up_menu'));
add_action('init', array($this, 'init')); add_action('init', array($this, 'init'));
add_filter('the_excerpt_rss', array($this, 'insert_rss_feed_ads')); add_filter('the_excerpt_rss', array($this, 'insert_rss_feed_ads'));
@ -34,6 +32,8 @@ class PluginWonderful {
} }
function _load_widgets() { function _load_widgets() {
global $wp_version;
if (version_compare($wp_version, "2.8", ">=")) { if (version_compare($wp_version, "2.8", ">=")) {
if (class_exists('WP_Widget')) { if (class_exists('WP_Widget')) {
register_widget('PluginWonderfulWidget'); register_widget('PluginWonderfulWidget');
@ -48,8 +48,6 @@ class PluginWonderful {
* Initialize the object if it isn't already. * Initialize the object if it isn't already.
*/ */
function init() { function init() {
global $wp_version;
if (empty($this->adboxes_client)) { if (empty($this->adboxes_client)) {
$this->messages = array(); $this->messages = array();
$this->adboxes_client = new PWAdboxesClient(); $this->adboxes_client = new PWAdboxesClient();