use update option
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 25 Sep 2014 12:57:50 +0000 (08:57 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 25 Sep 2014 12:57:50 +0000 (08:57 -0400)
This will create the option also.

controllers/admin.php

index 308b142..510c5b8 100644 (file)
@@ -60,7 +60,7 @@ class AdminController
         require_once ABSPATH . 'wp-admin/includes/upgrade.php';
         \dbDelta($sql);
 
-        \add_option(SELF::DB_OPTION, SELF::DB_VERSION);
+        \update_option(SELF::DB_OPTION, SELF::DB_VERSION);
     }
 
     public function initializeData()
@@ -85,7 +85,6 @@ class AdminController
         if (\get_option(SELF::DB_OPTION) != SELF::DB_VERSION) {
             $this->installApplication();
         }
-        \update_option(SELF::DB_OPTION, SELF::DB_VERSION);
     }
 
 }