Skip to content

Commit b0c4459

Browse files
authored
Fix duplicate admin-notices (#1956)
1 parent e0eee69 commit b0c4459

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

includes/table/class-followers.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ public function __construct() {
3535
$this->user_id = Actors::BLOG_USER_ID;
3636
} else {
3737
$this->user_id = \get_current_user_id();
38+
39+
\add_action( 'admin_notices', array( $this, 'process_admin_notices' ) );
3840
}
3941

4042
parent::__construct(
@@ -46,7 +48,6 @@ public function __construct() {
4648
);
4749

4850
\add_action( 'load-' . get_current_screen()->id, array( $this, 'process_action' ), 20 );
49-
\add_action( 'admin_notices', array( $this, 'process_admin_notices' ) );
5051
}
5152

5253
/**

includes/table/class-following.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ public function __construct() {
3535
$this->user_id = Actors::BLOG_USER_ID;
3636
} else {
3737
$this->user_id = \get_current_user_id();
38+
39+
\add_action( 'admin_notices', array( $this, 'process_admin_notices' ) );
3840
}
3941

4042
parent::__construct(
@@ -46,7 +48,6 @@ public function __construct() {
4648
);
4749

4850
\add_action( 'load-' . get_current_screen()->id, array( $this, 'process_action' ), 20 );
49-
\add_action( 'admin_notices', array( $this, 'process_admin_notices' ) );
5051
}
5152

5253
/**

0 commit comments

Comments
 (0)