Skip to content

Commit

Permalink
Formating and white space
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Olbekson committed Apr 4, 2014
1 parent 83c5c65 commit 65a328a
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,10 @@ private function __construct() {
require_once WP_STREAM_INC_DIR . 'admin.php';
add_action( 'plugins_loaded', array( 'WP_Stream_Admin', 'load' ) );

// Registers a hook that connectors and other plugins can use whenever a stream update happens
//add_action( 'init', array( 'WP_Stream_Admin' ), 'register_update_hook' );
add_action( 'init', array( __CLASS__, 'install' ) );

add_action( 'admin_init', function() {
WP_Stream_Admin::register_update_hook( dirname( plugin_basename( __FILE__ ) ), array( __CLASS__, 'install' ), WP_Stream::VERSION );
}, 99);
// Registers a hook that connectors and other plugins can use whenever a stream update happens
add_action( 'admin_init', array( __CLASS__, 'update_activation_hook' ) );
}
}

Expand Down Expand Up @@ -190,9 +187,6 @@ private function verify_database_present() {
}
}

// Check upgrade routine /** @internal Moving this to hook into an init hook It uses properties from WP_Stream_Admin */
//self::install();

if ( ! empty( $message ) ) {
self::$messages['wp_stream_db_error'] = sprintf(
'<div class="error">%s<p>%s</p></div>',
Expand All @@ -202,6 +196,10 @@ private function verify_database_present() {
}
}

static function update_activation_hook() {
WP_Stream_Admin::register_update_hook( dirname( plugin_basename( __FILE__ ) ), array( __CLASS__, 'install' ), self::VERSION );
}

/**
* Display a notice about php version
*
Expand Down

0 comments on commit 65a328a

Please sign in to comment.