Skip to content

Unconditionally use get_current_network_id#329

Open
swissspidy wants to merge 2 commits intomainfrom
fix/get_current_network_id
Open

Unconditionally use get_current_network_id#329
swissspidy wants to merge 2 commits intomainfrom
fix/get_current_network_id

Conversation

@swissspidy
Copy link
Copy Markdown
Member

The function was actually introduced in WP 4.6 and we now require 4.9

The function was actually introduced in WP 4.6 and we now require 4.9
@github-actions github-actions Bot added command:core-multisite-install Related to 'core multisite-install' command scope:distribution Related to distribution labels May 4, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request simplifies the update_db method in src/Core_Command.php by removing legacy compatibility logic for WordPress versions older than 4.9. The code now directly calls get_current_network_id() to determine the network ID. I have no feedback to provide.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@swissspidy swissspidy marked this pull request as ready for review May 4, 2026 13:36
@swissspidy swissspidy requested a review from a team as a code owner May 4, 2026 13:36
Copilot AI review requested due to automatic review settings May 4, 2026 13:36
Copy link
Copy Markdown
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 simplifies the multisite core update-db --network path by unconditionally using get_current_network_id() now that the project baseline no longer needs fallbacks for older WordPress versions.

Changes:

  • Removed conditional fallback logic for determining the network ID in multisite DB updates.
  • Always derive the network ID from the --url context via get_current_network_id().

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

Comment thread src/Core_Command.php Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@swissspidy swissspidy added this to the 2.1.29 milestone May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:core-multisite-install Related to 'core multisite-install' command scope:distribution Related to distribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants