Skip to content

Commit e3813f7

Browse files
committed
Fix clarkson core loader
1 parent 8325a5c commit e3813f7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

clarkson-core.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ protected function __construct() {
9090
require_once $autoload_file;
9191
}
9292

93-
add_action( 'init', array( $this, 'init' ) );
93+
if ( is_callable( 'add_action' ) ) {
94+
add_action( 'init', array( $this, 'init' ) );
95+
}
9496

9597
if ( ! class_exists( 'Clarkson_Core_Autoloader' ) ) {
9698
return;
@@ -116,7 +118,6 @@ protected function __construct() {
116118
$deprecated = Clarkson_Core_Deprecated::get_instance();
117119
$deprecated->auto_load_theme();
118120
}
119-
120121
}
121122

122123
/**
@@ -133,4 +134,4 @@ public function __wakeup() {
133134

134135
}
135136

136-
add_action( 'plugins_loaded', array( 'Clarkson_Core', 'get_instance' ) );
137+
Clarkson_Core::get_instance();

0 commit comments

Comments
 (0)