feat: add addon sunrise file loader#958
Conversation
Adds load_addon_sunrise_files() to Sunrise::init() that scans for plugins/ultimate-multisite-*/sunrise.php files and includes them after domain mapping but before ms_loaded. This allows addons (like multi-tenancy) to ship their own sunrise code without modifying the root sunrise.php, which Ultimate Multisite may overwrite on update.
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔨 Build Complete - Ready for Testing!📦 Download Build Artifact (Recommended)Download the zip build, upload to WordPress and test:
🌐 Test in WordPress Playground (Very Experimental)Click the link below to instantly test this PR in your browser - no installation needed! Login credentials: |
|
Performance Test Results Performance test results for 9ebfd21 are in 🛎️! Note: the numbers in parentheses show the difference to the previous (baseline) test run. Differences below 2% or 0.5 in absolute values are not shown. URL:
|
Summary
Adds
load_addon_sunrise_files()toSunrise::init()that auto-discovers and loadssunrise.phpfiles from Ultimate Multisite addon plugins.Why
Addons like multi-tenancy need to run code at sunrise time (before
ms-settings.phpresolves the network) to override$current_sitefor customer networks. Previously this required manually editing the rootsunrise.php, which Ultimate Multisite may overwrite on update.How
protected static function load_addon_sunrise_files()inSunriseclassWP_PLUGIN_DIR/ultimate-multisite-*/sunrise.phpviaglob()ms_loadedTesting
ultimate-multisite-multi-tenancywith its newsunrise.phpaidevops.sh v3.13.1 plugin for OpenCode v1.3.17 with gemma4:e4b spent 7d and 43,427 tokens on this as a headless worker.