File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,22 @@ public static function following_list_page() {
107
107
}
108
108
}
109
109
110
+ /**
111
+ * Creates the followers and following list tables in ActivityPub settings.
112
+ */
113
+ public static function add_settings_list_tables () {
114
+ $ tab = \sanitize_text_field ( \wp_unslash ( $ _GET ['tab ' ] ?? 'welcome ' ) ); // phpcs:ignore WordPress.Security.NonceVerification
115
+
116
+ switch ( $ tab ) {
117
+ case 'followers ' :
118
+ self ::add_followers_list_table ();
119
+ break ;
120
+ case 'following ' :
121
+ self ::add_following_list_table ();
122
+ break ;
123
+ }
124
+ }
125
+
110
126
/**
111
127
* Creates the followers list table.
112
128
*/
Original file line number Diff line number Diff line change @@ -28,8 +28,7 @@ public static function admin_menu() {
28
28
29
29
\add_action ( 'load- ' . $ settings_page , array ( Settings::class, 'add_settings_help_tab ' ) );
30
30
\add_action ( 'load-users.php ' , array ( Settings::class, 'add_users_help_tab ' ) );
31
- \add_action ( 'load- ' . $ settings_page , array ( Admin::class, 'add_followers_list_table ' ) );
32
- \add_action ( 'load- ' . $ settings_page , array ( Admin::class, 'add_following_list_table ' ) );
31
+ \add_action ( 'load- ' . $ settings_page , array ( Admin::class, 'add_settings_list_tables ' ) );
33
32
\add_action ( 'load- ' . $ settings_page , array ( Screen_Options::class, 'add_settings_list_options ' ) );
34
33
35
34
// User has to be able to publish posts.
You can’t perform that action at this time.
0 commit comments