Skip to content

Commit 8457ece

Browse files
committed
Move register_handlers outside of init
1 parent cd190e5 commit 8457ece

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

php/class-meta-box.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ class Meta_Box {
3535
*/
3636
public function __construct( Plugin $plugin ) {
3737
$this->plugin = $plugin;
38+
3839
add_action( 'init', array( $this, 'init_hook' ) );
40+
41+
$this->register_handlers();
3942
}
4043

4144
/**
@@ -47,7 +50,6 @@ public function __construct( Plugin $plugin ) {
4750
*/
4851
public function init_hook() {
4952
add_action( 'add_meta_boxes', array( $this, 'register_meta_box' ) );
50-
$this->register_handlers();
5153
}
5254

5355
/**

0 commit comments

Comments
 (0)