Skip to content

Commit

Permalink
Move plugin class initialization into init hook after requirements ch…
Browse files Browse the repository at this point in the history
…eck Fixes #50 + #52
  • Loading branch information
CamdenSegal committed Apr 4, 2016
1 parent 81f8a68 commit 8900f75
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/templates/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@ protected function __construct() {
$this->basename = plugin_basename( __FILE__ );
$this->url = plugin_dir_url( __FILE__ );
$this->path = plugin_dir_path( __FILE__ );

$this->plugin_classes();
}

/**
Expand Down Expand Up @@ -192,6 +190,7 @@ public function _deactivate() {}
public function init() {
if ( $this->check_requirements() ) {
load_plugin_textdomain( '<%= slug %>', false, dirname( $this->basename ) . '/languages/' );
$this->plugin_classes();
}
}

Expand Down

0 comments on commit 8900f75

Please sign in to comment.