Make WordPress Core

Opened 5 years ago

Closed 3 years ago

#49349 closed defect (bug) (duplicate)

wpmu_new_blog deprecated notice

Reported by: henrywright's profile henry.wright Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Networks and Sites Keywords:
Focuses: multisite Cc:

Description

If you try to use the wpmu_new_blog action you get this notice:

Notice: wpmu_new_blog is deprecated since version 5.1.0! Use wp_insert_site instead.

The wpmu_new_blog and wp_insert_site actions aren't directly comparable. For example, $user_id is passed to functions and methods hooked to wpmu_new_blog. It isn't available to functions and methods hooked to wp_insert_site.

Change History (3)

#1 @SergeyBiryukov
5 years ago

  • Component changed from General to Networks and Sites
  • Focuses multisite added

Thanks for the ticket! Introduced in [43654].

There's also a wp_initialize_site action that receives the $args array, which should contain user_id.

#2 @SergeyBiryukov
5 years ago

Related/duplicate: #49612

#3 @SergeyBiryukov
3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Thanks for the ticket! This is now fixed in [52816] / #49612. The other ticket had a patch and a bit more traction, so I think this one can be closed.

Note: See TracTickets for help on using tickets.