function gwolle_gb_installSplash() { ?> <div class="wrap"> <div id="icon-gwolle-gb"><br /></div> <h1>Gwolle-GB — <?php _e('Installation', GWOLLE_GB_TEXTDOMAIN); ?> </h1> <div> <?php if (!isset($_REQUEST['install_gwolle_gb']) || $_REQUEST['install_gwolle_gb'] != 'install_gwolle_gb') { _e('Welcome!<br>It seems that either you\'re using this plugin for the first time or you\'ve deleted all settings.<br>However, to use this plugin we have to setup the database tables. Good for you, we\'ve made this as easy as possible.<br>All you\'ve got to do is click on that button below, and that\'s it.', GWOLLE_GB_TEXTDOMAIN); ?> <br /><br /> <div> <form action="<?php echo $_SERVER['PHP_SELF'] . '?page=' . $_REQUEST['page']; ?> " method="POST"> <input type="hidden" id="install_gwolle_gb" name="install_gwolle_gb" value="install_gwolle_gb" /> <input type="submit" class="button button-primary" value="<?php esc_attr_e('Sure, let\'s do this!', GWOLLE_GB_TEXTDOMAIN); ?> "> </form> </div> <?php } elseif (isset($_REQUEST['install_gwolle_gb']) && $_REQUEST['install_gwolle_gb'] == 'install_gwolle_gb' && !get_option('gwolle_gb_version')) { // perform installation install_gwolle_gb(); echo sprintf(__('Allright, we\'re done. <a href="%s">Click here to continue...</a>', GWOLLE_GB_TEXTDOMAIN), $_SERVER['PHP_SELF'] . '?page=' . $_REQUEST['page']); } else { echo sprintf(__('It looks like there has been an error. <a href="%s">Click here to continue...</a>', GWOLLE_GB_TEXTDOMAIN), $_SERVER['PHP_SELF'] . '?page=' . $_REQUEST['page']); } ?> </div> </div> <?php }
function gwolle_gb_activation() { $current_version = get_option('gwolle_gb_version'); if ($current_version == false) { install_gwolle_gb(); } elseif ($current_version != GWOLLE_GB_VER) { upgrade_gwolle_gb(); } }