Skip to content

Upd. Settings. Update links on wpms to subsite settings. - #738

Merged
svedge merged 1 commit into
devfrom
upd-wpms-settings-links
Sep 16, 2026
Merged

svedge merged 1 commit into
devfrom
upd-wpms-settings-links

Conversation

@svedge

@svedge svedge commented Sep 16, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The only noted issue is a non-blocking test coverage nit; no unresolved blocking issues remain.

Pull request overview

Updates WordPress Multisite settings links to target the appropriate site settings.

Changes:

  • Adds centralized multisite-aware settings URL routing.
  • Updates PHP, React, banners, and scanner links.
  • Adds URL-routing tests and rebuilds the React bundle.
File summaries
File Summary
tests/main/StateTest.php Adds multisite URL-routing tests.
lib/CleantalkSP/SpbctWP/State.php Adds settings URL resolution.
lib/CleantalkSP/SpbctWP/Firewall/View.php Exposes the settings URL to React.
lib/CleantalkSP/SpbctWP/FeatureRestriction/FeatureRestrictionView.php Uses the resolved settings link.
lib/CleantalkSP/SpbctWP/AdminBannersModule/AdminBanners/AdminBannerWrongKey.php Updates invalid-key banner links.
lib/CleantalkSP/SpbctWP/AdminBannersModule/AdminBanners/AdminBannerEmptyKey.php Updates empty-key banner links.
js/src/react/components/TabContent/TabFirewall/TabFirewall.js Uses the supplied settings URL.
js/public/spbct-react-bundle.js Updates the compiled React bundle.
inc/spbc-settings.php Uses the configured settings link.
Review details

Suppressed comments (1)

tests/main/StateTest.php:45

  • This test only sets is_network/is_mainsite on the State; it never switches the WordPress test blog to a real non-main site. In the standard single-site test setup, both admin_url() and get_admin_url(get_main_site_id(), ...) can resolve to the same URL, so this does not exercise the new WPMS routing (and the mode-2 branch may not be available outside multisite). Guard this as a multisite test and create/switch to a subsite before asserting the two destinations.
        $subsite_state = new State(
            'spbc',
  • Files reviewed: 9/9 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@svedge
svedge merged commit d3fbe89 into dev Sep 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants