Exclude archived/deleted/spammed sites from user notification settings picker#70
Draft
Copilot wants to merge 2 commits into
Draft
Exclude archived/deleted/spammed sites from user notification settings picker#70Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
…s picker Agent-Logs-Url: https://github.com/humanmade/Falcon/sessions/d9c67dd8-e358-412c-a341-d40ab78143c1 Co-authored-by: rmccue <21655+rmccue@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix displayed archived sites in user notifications picker
Exclude archived/deleted/spammed sites from user notification settings picker
May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On multisite networks, the user notification settings picker displayed all Falcon-enabled sites regardless of their status, causing archived, deleted, and spammed sites to clutter the UI.
Changes
filter_inactive_sites( $sites )— new protected static helper onFalcon_Managerthat intersects a list of enabled site IDs againstavailable_sites()(which already querieswp_get_sites()witharchived=false,deleted=false,spam=false)user_profile_fields()— appliesfilter_inactive_sites()before passing sites to the network profile fields action, so inactive sites never render in the pickersave_profile_settings()— applies the same filter before dispatching the save action, keeping display and persistence consistentThe
falcon_enabled_sitesoption itself is unchanged — the filtering happens at runtime so it self-corrects as site statuses change without requiring any data migration.