Skip to content

Commit

Permalink
Added method to return array of plugin versions that require db update
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Olbekson committed Apr 4, 2014
1 parent ec61422 commit 1fceb01
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,12 @@ private function __construct() {
require_once WP_STREAM_INC_DIR . 'admin.php';
add_action( 'plugins_loaded', array( 'WP_Stream_Admin', 'load' ) );

add_action( 'init', array( __CLASS__, 'install' ) );
add_action( 'admin_init', array( __CLASS__, 'install' ) );

// 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 @@ -200,6 +201,22 @@ static function update_activation_hook() {
WP_Stream_Admin::register_update_hook( dirname( plugin_basename( __FILE__ ) ), array( __CLASS__, 'install' ), self::VERSION );
}

/**
* An array of plugin versions that require a database update
*
* @return array
*/
static function get_update_versions() {
return array(
'1.1.4', // Converted tables to correct character set
'1.1.7', // Altered the ip column to be varchar(39) and put after the created column
'1.2.5', // Changed the taxonomy records to use term_taxonomy_id instead of term_id
'1.2.8', // Support for attachments
'1.3.0',
'1.3.1',
);
}

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

0 comments on commit 1fceb01

Please sign in to comment.