Skip to content

Instantly share code, notes, and snippets.

@icambridge
Created February 4, 2015 15:44
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 icambridge/944f3f3ce5a65653bec5 to your computer and use it in GitHub Desktop.
Save icambridge/944f3f3ce5a65653bec5 to your computer and use it in GitHub Desktop.
<?php
define('WPSQT_VERSION', '1.2.1');
$oldVersion = get_option('wpsqt_version');
update_option('wpsqt_version',WPSQT_VERSION);
// Simple way of checking if an it's an update or not.
if ( !empty($oldVersion) && (version_compare($oldVersion, WPSQT_VERSION) < 0) ){
// Do upgrade stuff.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment