Skip to content

Conversation

@up1512001
Copy link
Member

Key Changes

  • Auto Multisite Configuration:
    When the plugin is network-activated, it now automatically detects and configures all sites within the same multisite network.

  • Governing Site Selection Modal:
    Introduced a one-time modal that appears after network activation, allowing administrators to select the governing site for managing patterns, templates, and shared resources.

  • Multisite REST Routes:
    Added required REST API endpoints to handle multisite configurations, site data synchronization, and governing site updates.

  • Auto API Key Update:
    Implemented automatic API key updates during multisite setup for seamless communication between network sites.

  • Utility Enhancements:
    Added helper functions and constants to manage options and streamline multisite-related logic.

  • Pattern/Template Improvements:

    • Unified delete confirmation messages for both patterns and templates.
    • Fixed processing states for buttons to ensure consistent user feedback.
  • Asset Management:
    Enqueued necessary JS files and defined constants to support modal interactions and multisite logic.

Closes

@up1512001 up1512001 self-assigned this Oct 24, 2025
@up1512001 up1512001 requested a review from Copilot October 24, 2025 11:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces comprehensive multisite support for the OneDesign plugin, enabling automatic detection and configuration of sites within a WordPress multisite network. The key enhancement is the governing site selection workflow that allows administrators to designate a primary site for managing shared patterns and templates across the network.

Key Changes:

  • Automatic multisite detection and configuration upon network activation
  • Governing site selection modal with REST API endpoints for site management
  • API key synchronization across network sites
  • Enhanced UI components for multisite brand site management

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
inc/classes/rest/class-multisite.php New REST API endpoints for governing site management and site configuration
inc/classes/plugin-configs/class-secret-key.php Added hook to trigger API key sync in multisite environments
inc/classes/plugin-configs/class-constants.php Added constant for multisite governing site option
inc/classes/class-utils.php New utility functions for multisite checks and site information retrieval
inc/classes/class-rest.php Conditionally loads multisite REST routes
inc/classes/class-plugin.php Conditionally loads multisite functionality
inc/classes/class-multisite.php Core multisite functionality including modal rendering and API key synchronization
inc/classes/class-assets.php Enqueues multisite setup script and passes multisite data to JavaScript
assets/src/js/constants.js Exports multisite-related constants for frontend use
assets/src/components/SiteTable.js Integrated multisite brand site management UI
assets/src/components/MultiSites.js New component for managing multisite network sites
assets/src/admin/settings/index.js Passes additional props to SiteTable for multisite support
assets/src/admin/patterns/components/BasePatternsTab.js Updated button to use isBusy prop for consistent loading states
assets/src/admin/patterns/components/AppliedPatternsTab.js Updated button and improved confirmation message
assets/src/admin/multisite-plugin/index.js New multisite governing site selection interface
Comments suppressed due to low confidence (1)

inc/classes/rest/class-multisite.php:1

  • The constant Constants::ONEDESIGN_MULTISITE_GOVERNING_SITE is used on line 128 and 158, but here a hardcoded string is used instead. Use the constant for consistency.
<?php

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@up1512001 up1512001 requested a review from Copilot October 24, 2025 12:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 4 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@up1512001 up1512001 requested a review from Copilot October 24, 2025 12:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 6 comments.

Comments suppressed due to low confidence (1)

assets/src/admin/multisite-plugin/index.js:1

  • Corrected contraction 'won't' - the backslash escape is unnecessary in template literals and makes the text harder to read. Use: won't instead of won\\'t
/**

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@up1512001 up1512001 marked this pull request as ready for review October 24, 2025 13:10
@danish17 danish17 added the javascript Pull requests that update javascript code label Oct 27, 2025
@up1512001 up1512001 requested a review from Copilot October 28, 2025 05:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 32 out of 32 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make OneDesign Plugin Compatible with WordPress Multisite (MU)

3 participants