Skip to content

Instantly share code, notes, and snippets.

@codehooligans
Created June 17, 2013 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codehooligans/5797137 to your computer and use it in GitHub Desktop.
Save codehooligans/5797137 to your computer and use it in GitHub Desktop.
function check_upgrade() {
// Check our version against the options table
if (is_multisite())
$options_version = get_site_option('wpmudev-chat-version');
else
$options_version = get_option('wpmudev-chat-version');
if (version_compare($this->chat_current_version, $options_version) > 0) {
$this->install();
if (is_multisite())
update_site_option('wpmudev-chat-version', $this->chat_current_version);
else
update_option('wpmudev-chat-version', $this->chat_current_version);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment