rename the text in images#272
Conversation
This is an update and collaboration to Ultimate Multisite, based on WP Ultimo, which was based on Pro Sites.
Changed all base images to reflect the new Ultimate Multisite name.
Simply added a white version of the logo to display on dark backgrounds. This was done quickly and needs to be re-done later.
Removed some embedded code for better and quicker integration. Also, preparing to add a few enhancements.
WalkthroughThis PR updates the plugin to version 3.0.2, adding editor configuration, renaming the translation domain and MCP category from "multisite-ultimate" to "ultimate-multisite", introducing customer email verification on creation, and updating documentation and metadata. Changes
Sequence Diagram(s)sequenceDiagram
participant System as System/Event
participant CM as Customer_Manager
participant DB as Customer DB
participant Email as Email Service
System->>CM: Wu_Event_Customer_Created<br/>(payload)
activate CM
CM->>CM: Check payload['customer_email_verification']
alt verification = 'pending'
CM->>DB: wu_get_customer(customer_id)
activate DB
DB-->>CM: Customer object
deactivate DB
alt Customer found
CM->>Email: send_verification_email()
activate Email
Email-->>CM: Email sent
deactivate Email
end
end
deactivate CM
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (3)
README.md (1)
4-4: README logo URL change is fineNew GitHub blob URL for the logo should render correctly on GitHub; if you later need embeds outside GitHub, you may want a raw URL or locally served asset instead.
inc/apis/trait-mcp-abilities.php (1)
47-50: MCP ability prefix is functionally consistent; branding alignment or BC documentation recommended
- The
'multisite-ultimate/'prefix inget_mcp_ability_prefix()aligns with the adapter check atinc/class-mcp-adapter.php:276, which filters abilities bystr_starts_with($ability_id, 'multisite-ultimate/'), so the code works as-is.- The old category slug
'multisite-ultimate'is not used elsewhere in functional code—only in infrastructure files.- However, branding is mixed: the category is now
'ultimate-multisite'and the label says "Multisite Ultimate", but the ability ID prefix remains'multisite-ultimate/'. Consider either:
- Aligning everything to
'ultimate-multisite/'(which would also require updating the adapter check), or- Adding a comment in
get_mcp_ability_prefix()documenting that the older prefix is retained for backward compatibility.Also applies to: 87-95, 176-214, 225-271, 281-307, 318-357, 368-401
inc/managers/class-customer-manager.php (1)
182-201: Consider consolidating duplicate verification logic.The logic in this method is nearly identical to
transition_customer_email_verification(lines 168-179). Both methods check for pending status and send verification emails.Consider extracting the shared logic:
/** * Send verification email if customer status is pending. * * @since 2.4.8 * @param int $customer_id Customer ID. * @return void */ private function send_verification_email_if_pending($customer_id): void { $customer = wu_get_customer($customer_id); if ($customer) { $customer->send_verification_email(); } }Then simplify both methods:
public function transition_customer_email_verification($old_status, $new_status, $customer_id): void { if ('pending' !== $new_status) { return; } - $customer = wu_get_customer($customer_id); - - if ($customer) { - $customer->send_verification_email(); - } + $this->send_verification_email_if_pending($customer_id); } public function customer_created_email_verification($payload): void { if (!isset($payload['customer_email_verification'], $payload['customer_id'])) { return; } if ('pending' !== $payload['customer_email_verification']) { return; } - $customer = wu_get_customer($payload['customer_id']); - - if ($customer) { - $customer->send_verification_email(); - } + $this->send_verification_email_if_pending($payload['customer_id']); }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
assets/img/logo-white.pngis excluded by!**/*.pngassets/img/logo-wide.pngis excluded by!**/*.png
📒 Files selected for processing (7)
.editorconfig(1 hunks)README.md(1 hunks)inc/admin-pages/class-setup-wizard-admin-page.php(1 hunks)inc/apis/trait-mcp-abilities.php(6 hunks)inc/managers/class-customer-manager.php(2 hunks)readme.txt(1 hunks)ultimate-multisite.php(3 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
inc/managers/class-customer-manager.php (2)
inc/functions/customer.php (1)
wu_get_customer(22-25)inc/models/class-customer.php (1)
send_verification_email(853-863)
🪛 LanguageTool
readme.txt
[grammar] ~234-~234: Use a hyphen to join words.
Context: ...ded magic login links for SSO when third party cookies are disabled. - New: Added...
(QB_NEW_EN_HYPHEN)
🔇 Additional comments (3)
.editorconfig (1)
1-13: EditorConfig looks consistent and safeSettings align with typical WP/PHP style (tabs for code, 2-space JSON/YAML) and should help normalize formatting across editors.
inc/admin-pages/class-setup-wizard-admin-page.php (1)
771-776: SUNRISE notice text domain change is correctSwitching this notice to use the
ultimate-multisitetext domain makes it consistent with the rest of the file and ensures the string is picked up by the main translation domain.inc/managers/class-customer-manager.php (1)
79-79: LGTM!The event hook registration follows the existing pattern and correctly wires the new customer creation event to the email verification handler.
| if ('pending' !== $payload['customer_email_verification']) { | ||
| return; | ||
| } | ||
|
|
||
| $customer = wu_get_customer($payload['customer_id']); |
There was a problem hiding this comment.
Add payload validation to prevent potential errors.
The method accesses $payload['customer_email_verification'] and $payload['customer_id'] without validating that these keys exist, which could trigger PHP warnings if the event payload is incomplete or malformed.
Apply this diff to add proper validation:
public function customer_created_email_verification($payload): void {
+ if (!isset($payload['customer_email_verification'], $payload['customer_id'])) {
+ return;
+ }
+
if ('pending' !== $payload['customer_email_verification']) {
return;
}
$customer = wu_get_customer($payload['customer_id']);
if ($customer) {
$customer->send_verification_email();
}
}🤖 Prompt for AI Agents
In inc/managers/class-customer-manager.php around lines 192 to 196, the code
reads $payload['customer_email_verification'] and $payload['customer_id']
without verifying those keys exist; add explicit payload validation by checking
that 'customer_email_verification' and 'customer_id' are present (use isset or
array_key_exists) before accessing them, return early if either is missing or
not a string/expected type, and only then call
wu_get_customer($payload['customer_id']); this prevents PHP warnings from
malformed or incomplete event payloads.
| Version [2.4.8] - Released on 2025-XX-XX | ||
| - New: Added MCP (Model Context Protocol) Server integration. | ||
| - New: Added support for multi-network installations with network-specific customers, memberships, and products. | ||
| - New: Added magic login links for SSO when third party cookies are disabled. | ||
| - New: Added admin notice when invalid COOKIE_DOMAIN constant is detected. | ||
| - Fixed: WooCommerce subscriptions incorrectly set to staging mode when site is duplicated. | ||
| - Fixed: Single-Sign-On (SSO) authentication issues with custom domains. | ||
| - Fixed: Template switching functionality and improved singleton pattern usage across codebase. | ||
| - Improved: Enhanced domain mapping element and login form handling. | ||
| - Improved: Better redirect handling for sites within the network. | ||
| - Improved: Faster site creation after checkout. |
There was a problem hiding this comment.
Fix hyphenation in "third-party cookies".
The compound adjective "third party" should be hyphenated when used before a noun.
Apply this diff:
-- New: Added magic login links for SSO when third party cookies are disabled.
+- New: Added magic login links for SSO when third-party cookies are disabled.Based on static analysis.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Version [2.4.8] - Released on 2025-XX-XX | |
| - New: Added MCP (Model Context Protocol) Server integration. | |
| - New: Added support for multi-network installations with network-specific customers, memberships, and products. | |
| - New: Added magic login links for SSO when third party cookies are disabled. | |
| - New: Added admin notice when invalid COOKIE_DOMAIN constant is detected. | |
| - Fixed: WooCommerce subscriptions incorrectly set to staging mode when site is duplicated. | |
| - Fixed: Single-Sign-On (SSO) authentication issues with custom domains. | |
| - Fixed: Template switching functionality and improved singleton pattern usage across codebase. | |
| - Improved: Enhanced domain mapping element and login form handling. | |
| - Improved: Better redirect handling for sites within the network. | |
| - Improved: Faster site creation after checkout. | |
| Version [2.4.8] - Released on 2025-XX-XX | |
| - New: Added MCP (Model Context Protocol) Server integration. | |
| - New: Added support for multi-network installations with network-specific customers, memberships, and products. | |
| - New: Added magic login links for SSO when third-party cookies are disabled. | |
| - New: Added admin notice when invalid COOKIE_DOMAIN constant is detected. | |
| - Fixed: WooCommerce subscriptions incorrectly set to staging mode when site is duplicated. | |
| - Fixed: Single-Sign-On (SSO) authentication issues with custom domains. | |
| - Fixed: Template switching functionality and improved singleton pattern usage across codebase. | |
| - Improved: Enhanced domain mapping element and login form handling. | |
| - Improved: Better redirect handling for sites within the network. | |
| - Improved: Faster site creation after checkout. |
🧰 Tools
🪛 LanguageTool
[grammar] ~234-~234: Use a hyphen to join words.
Context: ...ded magic login links for SSO when third party cookies are disabled. - New: Added...
(QB_NEW_EN_HYPHEN)
🤖 Prompt for AI Agents
In readme.txt around lines 231 to 241, the phrase "third party cookies" is
missing the hyphen when used as a compound adjective; update it to "third-party
cookies" in the listed changelog line so the compound modifier is correctly
hyphenated before the noun.
| * Plugin URI: https://ultimatemultisite.com | ||
| * Text Domain: ultimate-multisite | ||
| * Version: 2.4.7 | ||
| * Version: 3.0.2 |
There was a problem hiding this comment.
🧩 Analysis chain
Plugin metadata bump looks fine; verify version alignment across files
The header/docblock updates to version 3.0.2 and the new @package look good. To avoid release confusion (especially for wp.org), double‑check that readme.txt’s stable tag and changelog also reflect 3.0.2 (or the intended release version).
You can sanity‑check this with:
Also applies to: 30-34, 130-130
🏁 Script executed:
#!/bin/bash
rg -n "Stable tag" readme.txt || true
rg -n "Version:" ultimate-multisite.php
rg -n "3\.0\.2" readme.txt ultimate-multisite.php || trueLength of output: 126
Version mismatch: readme.txt and plugin header are out of sync
The plugin header declares Version: 3.0.2, but readme.txt still lists Stable tag: 2.4.7. This must be aligned before release—update readme.txt's stable tag to 3.0.2 to match the plugin header and changelog entries (lines 30–34).
🤖 Prompt for AI Agents
In ultimate-multisite.php around line 7 the plugin header declares Version:
3.0.2 but the readme.txt stable tag is still 2.4.7; update readme.txt (lines
~30–34 where the Stable tag and changelog live) to set "Stable tag: 3.0.2" so it
matches the plugin header and changelog entries, then save and verify both files
show 3.0.2 before releasing.
|
close is favor of #273 |
Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.