Skip to content

Commit bf01c10

Browse files
authored
Following: Load polling only on following tables (#2023)
1 parent e4e272f commit bf01c10

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

includes/wp-admin/class-heartbeat.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ public static function init() {
2929
* Enqueue scripts and localize data for the Following list table.
3030
*/
3131
public static function enqueue_scripts() {
32+
$tab = \sanitize_text_field( \wp_unslash( $_GET['tab'] ?? 'welcome' ) ); // phpcs:ignore WordPress.Security.NonceVerification
33+
if ( \get_current_screen()->id === 'settings_page_activitypub' && 'following' !== $tab ) {
34+
return;
35+
}
36+
3237
// Get the current user ID.
3338
$user_id = \get_current_screen()->id === 'settings_page_activitypub'
3439
? Actors::BLOG_USER_ID

0 commit comments

Comments
 (0)