Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multisite: Use WP 5.1-era hook wp_initialize_site #12252

Merged
merged 1 commit into from
May 15, 2019
Merged

Conversation

kraftbj
Copy link
Contributor

@kraftbj kraftbj commented May 2, 2019

Fixes #11437
Requires: #12287

wpmu_new_blog is deprecated. Need to use wp_initialize_site.

Changes proposed in this Pull Request:

  • Uses new hook.

Testing instructions:

  • On a multisite running WP 5.1+, in Network Admin, choose option to automatically connect subsites.
  • Create a new site.
  • Verify no notices in the php log and the site connects.

Proposed changelog entry for your changes:

  • Multisite: Use modern wp_initialize_site hook when automatically connecting new sites.

@kraftbj kraftbj added [Focus] Multisite [Status] Needs Review To request a review from Crew. Label will be renamed soon. DO NOT MERGE don't merge it! labels May 2, 2019
@kraftbj kraftbj added this to the 7.4 milestone May 2, 2019
@kraftbj kraftbj requested a review from a team as a code owner May 2, 2019 22:40
@jetpackbot
Copy link

Thank you for the great PR description!

When this PR is ready for review, please apply the [Status] Needs Review label. If you are an a11n, please have someone from your team review the code if possible. The Jetpack team will also review this PR and merge it to be included in the next Jetpack release.

Scheduled Jetpack release: May 7, 2019.
Scheduled code freeze: April 30, 2019

Generated by 🚫 dangerJS against 9fd39dd

@jeherve
Copy link
Member

jeherve commented May 9, 2019

choose option to automatically connect subsites.

Did the option ever work? It is currently commented out, and I think it's always been commented out.

When I uncomment it, I can save the option, but when creating a new site it does not seem to be automatically connected to WordPress.com right now.

Maybe we could remove all of this if it's been commented out since Jetpack 2.9?

@kraftbj
Copy link
Contributor Author

kraftbj commented May 13, 2019

You're right; the UI is disabled. You can manually set the option (or filter) and it does work. WordCamp uses it when new camp sites are spun up.

@jeherve jeherve added [Status] Needs Product Review Consider posting about this on an internal P2 for discussion [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Product Review Consider posting about this on an internal P2 for discussion DO NOT MERGE don't merge it! [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels May 14, 2019
Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

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

It works well in my tests. Good to merge!

Noting that I had to go through a few hoops to test with Jetpack Beta since we check for the jetpack/jetpack.php plugin on our Network admin settings pages, but not for jetpack-dev/jetpack.php.

@kraftbj kraftbj merged commit 4616258 into master May 15, 2019
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels May 15, 2019
@kraftbj kraftbj deleted the update/wpmu_hooks branch May 15, 2019 15:09
jeherve added a commit that referenced this pull request May 17, 2019
jeherve added a commit that referenced this pull request May 23, 2019
jeherve added a commit that referenced this pull request May 27, 2019
* Kick off the changelog

* Add 7.3.1

* Update date and post link

* changelog: add #12219

* changelog: add #12170

* changelog: add #12184

* Changelog: add #12268

* Changelog: add #12081

* Changelog: add #12323

* Changelog: add #12204

* Changelog: add #12269

* Changelog: add #12332

* changelog: add #12339

* changelog: add #12209

* Changelog: add #12319

* Changelog: add #12357

* Changelog: add #12124

* Changelog: add #12373

* Changelog: add #12252

* Changelog: add #12383

* Changelog: add #12372

* changelog: add #12337

* Changelog: add #12290

* Changelog: add #12301

* Changelog: add #12061

* Testing list: add instructions for #12061

* Changelog: add #12393

* Update minimum supported version

See #12287

* Changelog: add #12406

* Testing list: add #12406

* Changelog: add #12277

* Changelog: add #12412

* Changelog: add #11318

* Changelog: add #12328

* Changelog: add #12425

* Changelog: add #12380

* Changelog: add #12428

* Changelog: add #12414

* Changelog: add #12395

* Changelog & Testing list: add #12416, #12417, #12418, and #12348

* changelog: add #12379

* Changelog: add #12341

* changelog: add #12444

* Changelog: add #12434

* Changelog: add #12454

* Changelog: add #12460

* Changelog: add #12463

* Changelog: add #12457

* Changelog / testing list: add #10333

* Changelog: add #12467


Co-authored-by: Jeremy Herve <jeremy@jeremy.hu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hook wpmu_new_blog callbacks to wp_insert_site / wp_initialize_site
4 participants