Skip to content

Commit

Permalink
Decouple Setting property by using it via add_loadie() method
Browse files Browse the repository at this point in the history
  • Loading branch information
Maria Daniel Deepak committed Sep 12, 2017
1 parent f4fb219 commit 70fb994
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
8 changes: 0 additions & 8 deletions include/Core/EmailLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,6 @@ class EmailLog {
*/
public $table_manager;

/**
* Email Log Plugins Setting.
*
* @since 2.1.0
* @var \EmailLog\Core\UI\Setting\Setting
*/
public $setting;

/**
* Add-on Licenser.
*
Expand Down
2 changes: 1 addition & 1 deletion load-email-log.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ function load_email_log( $plugin_file ) {
$loader->register();

$email_log = new \EmailLog\Core\EmailLog( $plugin_file, $loader, new \EmailLog\Core\DB\TableManager() );
$email_log->setting = new EmailLog\Core\UI\Setting\EmailLogSetting();

$email_log->set_licenser( new \EmailLog\Addon\License\Licenser() );

Expand All @@ -48,6 +47,7 @@ function load_email_log( $plugin_file ) {
$email_log->add_loadie( new \EmailLog\Core\Request\NonceChecker() );
$email_log->add_loadie( new \EmailLog\Core\Request\LogListAction() );
$email_log->add_loadie( new \EmailLog\Core\Request\OverridePluginAPI() );
$email_log->add_loadie( new EmailLog\Core\UI\Setting\EmailLogSetting() );

// `register_activation_hook` can't be called from inside any hook.
register_activation_hook( $plugin_file, array( $email_log->table_manager, 'on_activate' ) );
Expand Down

0 comments on commit 70fb994

Please sign in to comment.