Permalink
Browse files

Use 'admin_init' hook for upgrades.

  • Loading branch information...
1 parent 38e3aad commit 798a187f610d5f478d1e87d2cd3f866c2e517a25 @mgsisk committed Jan 22, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 -/php/admin.php
View
@@ -37,7 +37,7 @@ public function __construct() {
register_deactivation_hook( self::$dir . 'webcomic.php', array( $this, 'deactivate' ) );
if ( !self::$config or version_compare( self::$config[ 'version' ], self::$version, '<' ) ) {
- $this->activate();
+ add_action( 'admin_init', array( $this, 'activate' ) );
}
if ( self::$config and version_compare( self::$config[ 'version' ], '4x', '>=' ) ) {

0 comments on commit 798a187

Please sign in to comment.