Hook wpmu_new_blog
callbacks to wp_insert_site
/ wp_initialize_site
#11437
Labels
[Feature] Likes
[Focus] Multisite
[Type] Bug
When a feature is broken and / or not performing as intended
[Type] Janitorial
Milestone
Jetpack hooks into the
wpmu_new_blog
action in two places:https://github.com/Automattic/jetpack/blob/ca7c26b/modules/likes.php#L80
https://github.com/Automattic/jetpack/blob/b578d60/class.jetpack-network.php#L76
WP 5.1 deprecated that hook in favor of
wp_insert_site
andwp_initialize_site
.Because of that, notices are being triggered when any plugin calls
wp_insert_site()
, even if that plugin uses the new hooks correctly. The notice is triggered if any active plugin is using the deprecated hooks. Because of that, local development workflows are broken byheaders already sent
crashes, and production error logs are cluttered with noise, making them less useful.Steps to reproduce the issue
wp_insert_site()
from an mu-plugin,wp shell
, etcWhat I expected
No notices should be triggered.
What happened instead
A notice was triggered.
Screenshots
The text was updated successfully, but these errors were encountered: