Skip to content

Conversation

@superdav42
Copy link
Collaborator

@superdav42 superdav42 commented Sep 30, 2025

Summary by CodeRabbit

  • New Features

    • Setup Wizard: richer UI with preloaded settings and support for custom HTML attributes.
    • Recommended Plugins installer: can activate the User Switching plugin after install.
  • Chores

    • Rebranded to UltimateMultisite.com across admin notices, URLs, update endpoint, newsletter and support links.
    • Plugin version updated to 2.4.5.
  • Documentation

    • Readme and translation template updated to reflect branding and new installer strings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 30, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This change set updates branding/URLs to ultimatemultisite.com, adjusts setup-wizard scripts/localizations and html_attr propagation, changes newsletter endpoints and admin messages, reorders Newsletter/Credits initialization, adds a plugin activation step in the recommended plugins installer, refreshes translations, and replaces two encoded literals.

Changes

Cohort / File(s) Summary
Branding and metadata
composer.json, ultimate-multisite.php, sunrise.php, readme.txt
Updated project and plugin URIs and MULTISITE_ULTIMATE_UPDATE_URL to https://ultimatemultisite.com and adjusted related metadata strings.
User-facing copy / links
views/base/addons.php, views/ui/branding/footer.php, views/wizards/setup/ready.php, inc/class-addon-repository.php
Replaced domain occurrences and adjusted admin notices/copy to reference UltimateMultisite.com and updated support links.
Setup Wizard & UI form attributes
inc/admin-pages/class-setup-wizard-admin-page.php, inc/admin-pages/class-wizard-admin-page.php
Added Settings import and localized data; enqueued/registered Vue and mask helpers; localized wu_selectizer/wu_settings/wu_ticker; added html_attr propagation and embedded data-* attributes into the "your-company" section.
Admin add-ons auth check
inc/admin-pages/class-addons-admin-page.php
Domain check in add_auth_headers_to_download now matches "ultimatemultisite.com".
Newsletter endpoints
inc/class-newsletter.php
Updated wp_remote_post endpoints to https://ultimatemultisite.com/wp-json/newsletter/v2/subscribers.
Initialization ordering
inc/class-wp-ultimo.php
Newsletters and Credits are instantiated earlier in init; Credits loading removed from load_extra_components; version bumped to 2.4.5.
Recommended plugins installer
inc/installers/class-recommended-plugins-installer.php
Added activate_plugin_ installer step and activate_plugin helper; introduced is_plugin_active and get_plugin_file helpers; refactored detection to use str_starts_with; logs Throwable on activation failures.
Encoded literals
inc/stuff.php
Replaced two base64-encoded string values (keys 0 and 1) and adjusted array formatting; no logic changes.
Translations / POT
lang/ultimate-multisite.pot
Updated POT header timestamp and many msgid/msgstr entries to reflect branding/domain change; added entries for plugin activation copy and other UI strings.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Admin
  participant WizardUI as Setup Wizard UI
  participant Settings as WP_Ultimo\Settings
  participant UIForm as UI\Form
  Admin->>WizardUI: Open Setup Wizard
  WizardUI->>Settings: get_all_with_defaults(true)
  Settings-->>WizardUI: settings data
  WizardUI->>WizardUI: build section.html_attr (data-*)
  WizardUI->>UIForm: new Form(... html_attr: section.html_attr ...)
  Note right of UIForm #DDF2E6: Form renders fields with extra HTML attributes
  WizardUI->>Admin: enqueue wu-vue, masks, apps
  WizardUI->>Admin: localize wu_selectizer, wu_settings, wu_ticker
Loading
sequenceDiagram
  autonumber
  actor Admin
  participant Installer as RecommendedPluginsInstaller
  participant WPorg as WordPress.org API
  participant WP as WP Plugins API

  Admin->>Installer: Run "Activate User Switching"
  alt Plugin not installed
    Installer->>WPorg: request install (slug)
    WPorg-->>Installer: package installed
  end
  Installer->>WP: is_plugin_active(slug)?
  alt Inactive
    Installer->>WP: activate_plugin(slug)
    WP-->>Installer: success / WP_Error
    opt Error
      Installer->>Installer: wu_log_add(Throwable)
    end
  end
  Installer-->>Admin: step complete
Loading
sequenceDiagram
  autonumber
  participant Core as WP_Ultimo::init
  participant Newsletter as \WP_Ultimo\Newsletter
  participant Credits as \WP_Ultimo\Credits
  Note over Core: Early-load for wizard readiness
  Core->>Newsletter: get_instance()
  Core->>Credits: get_instance()
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

I nibble on links, hop domains with glee,
From Multi to Ultimate—brand-new spree!
I sprinkle attrs, Vue in tow,
Flip the switch—plugins aglow.
Newsletters route, credits align—thump-thump! 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The title “fix Activate wizard” suggests a targeted fix to an activation wizard, but the pull request predominantly renames the project domain across numerous files and introduces script localization and HTML attribute enhancements to the setup wizard, as well as new plugin activation flows. It does not accurately describe the main thrust of the changes, which center on a domain migration and supporting updates rather than solely fixing a wizard. As a result, the title fails to convey the primary modifications in this PR. Please update the title to reflect the domain migration and related enhancements, for example “Rename project domain to ultimatemultisite.com and enhance setup wizard scripts,” so that it clearly summarizes the primary changes for reviewers.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6e83a39 and 683a269.

📒 Files selected for processing (2)
  • inc/class-wp-ultimo.php (2 hunks)
  • lang/ultimate-multisite.pot (13 hunks)

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
inc/installers/class-recommended-plugins-installer.php (1)

84-170: Avoid PHP 8-only helpers in PHP 7.4-compatible code

The plugin still advertises PHP 7.4.30 support, but these new str_starts_with() calls require PHP 8+ and will hard-fatal on every PHP 7.x install.(wordpress.org) Please stick to prefix checks that work on PHP 7.4.

-		if (str_starts_with($installer, 'install_plugin_')) {
+		if (strpos($installer, 'install_plugin_') === 0) {
 			$plugin_slug = substr($installer, strlen('install_plugin_'));
@@
-		if (str_starts_with($installer, 'activate_plugin_')) {
+		if (strpos($installer, 'activate_plugin_') === 0) {
 			$plugin_slug = substr($installer, strlen('activate_plugin_'));
@@
-			if (str_starts_with($file, $plugin_slug . '/')) {
+			if (strpos($file, $plugin_slug . '/') === 0) {
@@
-			if (str_starts_with($file, $plugin_slug . '/')) {
+			if (strpos($file, $plugin_slug . '/') === 0) {
🧹 Nitpick comments (1)
inc/stuff.php (1)

3-4: Add documentation for the base64-encoded values.

The purpose and contents of these base64-encoded strings are unclear. Consider:

  • Adding comments explaining what these values represent
  • Using descriptive array keys instead of numeric indices
  • Moving sensitive data (if applicable) to environment variables or a secure configuration system

This improves maintainability and makes the code's intent transparent.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 737bdb9 and 6e83a39.

📒 Files selected for processing (17)
  • composer.json (1 hunks)
  • inc/admin-pages/class-addons-admin-page.php (1 hunks)
  • inc/admin-pages/class-setup-wizard-admin-page.php (4 hunks)
  • inc/admin-pages/class-wizard-admin-page.php (1 hunks)
  • inc/class-addon-repository.php (1 hunks)
  • inc/class-credits.php (1 hunks)
  • inc/class-newsletter.php (2 hunks)
  • inc/class-wp-ultimo.php (1 hunks)
  • inc/installers/class-recommended-plugins-installer.php (4 hunks)
  • inc/stuff.php (1 hunks)
  • lang/ultimate-multisite.pot (13 hunks)
  • readme.txt (2 hunks)
  • sunrise.php (1 hunks)
  • ultimate-multisite.php (2 hunks)
  • views/base/addons.php (1 hunks)
  • views/ui/branding/footer.php (1 hunks)
  • views/wizards/setup/ready.php (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (3)
inc/admin-pages/class-setup-wizard-admin-page.php (7)
inc/class-wp-ultimo.php (1)
  • WP_Ultimo (23-942)
inc/class-settings.php (2)
  • Settings (23-1684)
  • get_all_with_defaults (165-178)
inc/functions/array-helpers.php (1)
  • wu_array_map_keys (136-143)
inc/functions/url.php (1)
  • wu_ajax_url (73-95)
inc/functions/settings.php (1)
  • wu_get_setting (39-42)
inc/functions/currency.php (1)
  • wu_get_currency_symbol (174-354)
inc/functions/date.php (1)
  • wu_get_current_time (89-98)
inc/class-wp-ultimo.php (2)
inc/class-newsletter.php (1)
  • Newsletter (13-109)
inc/class-credits.php (1)
  • Credits (24-306)
inc/installers/class-recommended-plugins-installer.php (2)
inc/functions/helper.php (1)
  • wu_log_add (208-211)
inc/class-wp-ultimo.php (1)
  • WP_Ultimo (23-942)
🪛 GitHub Check: Code Quality Checks
inc/stuff.php

[failure] 5-5:
Expected 1 newline at end of file; 0 found


[failure] 4-4:
Array item not aligned correctly; expected 4 spaces but found 2


[warning] 4-4:
Found precision alignment of 2 spaces.


[failure] 3-3:
Array item not aligned correctly; expected 4 spaces but found 2


[warning] 3-3:
Found precision alignment of 2 spaces.


[failure] 2-2:
There should be no space between the "array" keyword and the open parenthesis. Found: 1 space

🪛 PHPMD (2.15.0)
inc/installers/class-recommended-plugins-installer.php

163-163: Avoid unused local variables such as '$data'. (undefined)

(UnusedLocalVariable)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: cypress (8.1, chrome)
  • GitHub Check: cypress (8.2, chrome)
🔇 Additional comments (9)
inc/class-addon-repository.php (1)

229-229: LGTM! Domain branding update is consistent.

The admin notices now correctly reference "UltimateMultisite.com" instead of the old domain, aligning with the broader rebranding effort across the codebase.

Also applies to: 237-237

inc/admin-pages/class-wizard-admin-page.php (1)

347-347: LGTM! Clean propagation of HTML attributes to form wrapper.

The addition of html_attr with a safe default (??[]) enables sections to attach data attributes to the form element, supporting dynamic UI features like Vue apps without breaking existing code.

readme.txt (2)

132-136: LGTM! Update Server domain references updated consistently.

The service description and associated Terms/Privacy Policy URLs now correctly point to ultimatemultisite.com, maintaining consistency with the broader rebranding effort.


206-212: LGTM! Newsletter Service domain references updated consistently.

The Newsletter Service description and associated URLs now correctly point to ultimatemultisite.com, completing the domain rebranding for external service disclosures.

inc/admin-pages/class-setup-wizard-admin-page.php (4)

21-21: LGTM! Settings import added for dynamic state generation.

The import enables direct access to Settings::get_instance() used in line 479 for building the data-state attribute.


903-937: LGTM! Script localizations added for enhanced wizard functionality.

The three localization blocks provide necessary data for:

  • wu_selectizer: AJAX endpoint for dynamic selects
  • wu_settings: Currency and formatting configuration
  • wu_ticker: Timezone and clock offset for time-based features

All values are retrieved via safe getter functions (wu_get_setting, wu_get_currency_symbol, etc.).


958-962: Vue dependencies registered for footer credits toggle UI.

The comment clarifies these scripts support the dynamic footer credits options in the wizard. The dependency chain is correct: wu-vuewu-money-mask/wu-input-maskwu-vue-apps.

Note: Only wu-vue-apps is enqueued; others are registered as dependencies and will load automatically.


476-480: Confirm key mapping, escaping, and sensitive values

  • wu_replace_dashes only replaces “-” with “_”; ensure your setting slugs can’t contain other unsafe characters.
  • Verify that the JSON string from wp_json_encode() is passed through esc_attr (or equivalent) when rendered via html_attr.
  • Explicitly omit any sensitive fields (API keys, secrets, tokens) from the array returned by Settings::get_all_with_defaults(true) before encoding.
inc/class-wp-ultimo.php (1)

156-158: Remove unnecessary dependency caution.

Newsletter and Credits only register hooks and use global functions defined during plugin bootstrap; they don’t depend on services or managers loaded later, so early instantiation here is safe.

Likely an incorrect or invalid review comment.

Comment on lines +2 to +5
return array (
0 => 'ekmN3BXJCSjIWYaZzdR8sUtwRnRBemd1Z08ySVB2Z3I2NTNJS0FSREExNzhJYlloRDhTMlhldjR6UHc1RTFKM1Exam5pOG1RV2V2NHlyNk0=',
1 => '4r+6L3n+zDRa6Leurkn4jUFpMGlkeG9LaHdBbE9HamZrNVlLNHdYRzhYVnJNSWI5T0d2SVVxdWNWWlVOSmVxTVhoWElvVjlOcU9rRnF6UFI=',
);
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix formatting issues flagged by static analysis.

Multiple formatting issues need to be addressed:

  • Remove the space between "array" and the opening parenthesis
  • Align array items with 4 spaces (not 2)
  • Add a newline at the end of the file

Apply this diff to fix the formatting:

-return array (
-  0 => 'ekmN3BXJCSjIWYaZzdR8sUtwRnRBemd1Z08ySVB2Z3I2NTNJS0FSREExNzhJYlloRDhTMlhldjR6UHc1RTFKM1Exam5pOG1RV2V2NHlyNk0=',
-  1 => '4r+6L3n+zDRa6Leurkn4jUFpMGlkeG9LaHdBbE9HamZrNVlLNHdYRzhYVnJNSWI5T0d2SVVxdWNWWlVOSmVxTVhoWElvVjlOcU9rRnF6UFI=',
-);
+return array(
+    0 => 'ekmN3BXJCSjIWYaZzdR8sUtwRnRBemd1Z08ySVB2Z3I2NTNJS0FSREExNzhJYlloRDhTMlhldjR6UHc1RTFKM1Exam5pOG1RV2V2NHlyNk0=',
+    1 => '4r+6L3n+zDRa6Leurkn4jUFpMGlkeG9LaHdBbE9HamZrNVlLNHdYRzhYVnJNSWI5T0d2SVVxdWNWWlVOSmVxTVhoWElvVjlOcU9rRnF6UFI=',
+);
📝 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.

Suggested change
return array (
0 => 'ekmN3BXJCSjIWYaZzdR8sUtwRnRBemd1Z08ySVB2Z3I2NTNJS0FSREExNzhJYlloRDhTMlhldjR6UHc1RTFKM1Exam5pOG1RV2V2NHlyNk0=',
1 => '4r+6L3n+zDRa6Leurkn4jUFpMGlkeG9LaHdBbE9HamZrNVlLNHdYRzhYVnJNSWI5T0d2SVVxdWNWWlVOSmVxTVhoWElvVjlOcU9rRnF6UFI=',
);
return array(
0 => 'ekmN3BXJCSjIWYaZzdR8sUtwRnRBemd1Z08ySVB2Z3I2NTNJS0FSREExNzhJYlloRDhTMlhldjR6UHc1RTFKM1Exam5pOG1RV2V2NHlyNk0=',
1 => '4r+6L3n+zDRa6Leurkn4jUFpMGlkeG9LaHdBbE9HamZrNVlLNHdYRzhYVnJNSWI5T0d2SVVxdWNWWlVOSmVxTVhoWElvVjlOcU9rRnF6UFI=',
);
🧰 Tools
🪛 GitHub Check: Code Quality Checks

[failure] 5-5:
Expected 1 newline at end of file; 0 found


[failure] 4-4:
Array item not aligned correctly; expected 4 spaces but found 2


[warning] 4-4:
Found precision alignment of 2 spaces.


[failure] 3-3:
Array item not aligned correctly; expected 4 spaces but found 2


[warning] 3-3:
Found precision alignment of 2 spaces.


[failure] 2-2:
There should be no space between the "array" keyword and the open parenthesis. Found: 1 space

🤖 Prompt for AI Agents
In inc/stuff.php around lines 2 to 5, the array formatting must be corrected:
remove the space between "array" and the opening parenthesis so it reads
"array(", re-indent the array items using 4 spaces for each item (not 2), and
ensure the file ends with a single newline; apply these formatting changes to
the shown lines and save the file with a trailing newline.

@superdav42 superdav42 merged commit 3579179 into main Oct 1, 2025
8 of 10 checks passed
@superdav42 superdav42 deleted the activate-wizard branch October 1, 2025 01:26
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