Upd. Settings. Update links on wpms to subsite settings. - #738
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 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_mainsiteon theState; it never switches the WordPress test blog to a real non-main site. In the standard single-site test setup, bothadmin_url()andget_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.
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.
task https://app.doboard.com/1/task/43749