Skip to content

Let a network switch off the network admin screens #731

Closed

Description

@josephfusco

Network Admin gets an Online column on Sites, an Online view and column on Users, and a Who's Online network dashboard widget. A network that doesn't want them can't remove them without code.

This one is network-wide UI, so unlike the per-site pieces its switch belongs only on Network Admin > Settings > Presence API. A per-site checkbox would decide network screens by whichever site the request started on.

How

#724 adds the switch and does post locks end to end. Start once it merges.

  1. Let an entry in wp_presence_get_features() say it is network-only (for example 'network' => true), so wp_presence_register_feature_settings() adds its row to the network page alone and wp_presence_feature_enabled() reads only the network option for it.
  2. Add the network-admin entry.
  3. In includes/ms-default-filters.php, wrap the hooks below in if ( wp_presence_feature_enabled( 'network-admin' ) ) { … } with the "Plugin only" comment.
  4. Tests in tests/test-features.php, @group ms-required: the checkbox shows on the network screen and not on the site one, and the hooks come and go with the switch.

Hooks to gate

Hook Callback
wpmu_blogs_columns wp_presence_register_network_sites_column
manage_sites_custom_column wp_presence_render_network_sites_column
admin_enqueue_scripts wp_presence_enqueue_network_sites_assets
network_admin_notices wp_presence_network_aggregation_notice
views_users-network wp_presence_network_users_views
users_list_table_query_args wp_presence_filter_network_online_users
wpmu_users_columns wp_presence_register_network_users_column
manage_users-network_custom_column wp_presence_render_network_users_column
wp_network_dashboard_setup WP_Presence_Network_Widget_Whos_Online::register
heartbeat_received WP_Presence_Network_Widget_Whos_Online::heartbeat_received

Leave the network summary hooks alone (wp_presence_admin_room_changed → push and flush, wp_delete_site, the expired-rows cleanup, remove_user_from_blog → wp_presence_on_user_removed). Building the summary already has its own switch, wp_presence_network_aggregation_enabled. Whether switching the screens off should also stop building it is a call to make in the PR.

avatar-stack.php serves the sites column and the network widget, so it stays loaded like every other file.

How we will know it is done

npm run test:multisite

Part of #710.

Activity

  1. added
    [Type] Enhancement
    [Area] Multisite
    on Oct 5, 2026
  2. i-am-chitti commented on Oct 6, 2026

    @i-am-chitti
    Collaborator

    Hi @josephfusco, I'll pick this one.

  3. self-assigned this
    on Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

[Area] Multisite[Type] Enhancement

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions