Skip to:
Content

BuddyPress.org

Opened 13 months ago

Last modified 11 months ago

#7984 new defect (bug)

Core multisite changes require mods to BP

Reported by: boonebgorges Owned by:
Milestone: Up Next Priority: normal
Severity: normal Version:
Component: Blogs Keywords: needs-patch
Cc:

Description

In preparation for 'site' support in the core REST API, WordPress has made some internal changes surrounding site creation in Multisite. See https://core.trac.wordpress.org/ticket/41333 and especially https://core.trac.wordpress.org/changeset/43654 for details. Summary:

  • The new canonical way to create a site is wp_initialize_site(), and other methods (wpmu_create_blog() etc) will soon be converted to wrappers and deprecated
  • WPMU hooks like wpmu_new_blog are deprecated

In the medium term, we should migrate over to the new methods, though doing this will require some WP capability sniffing. (For example, I'm not sure of an elegant way to hook to wpmu_new_blog only if the new wp_initialize_site hook is not available.)

In the short term, we should add deprecation notices to our automated tests so that they pass.

Change History (6)

#1 @boonebgorges
13 months ago

In 12242:

Tests: When tearing down test fixtures, use wp_uninitialize_site() if available.

See #7984.

#2 @boonebgorges
13 months ago

In 12243:

Tests: Add deprecation notices for wpmu_new_blog and delete_blog hook usage.

See #7984.

#3 @boonebgorges
13 months ago

In 12245:

Tests: More targeted 'wpmu_new_blog' deprecation notices.

When a test could run under non-MS, the expectedDeprecated annotation
cannot apply to the entire test.

See #7984.

#4 @boonebgorges
13 months ago

In 12246:

Tests: Move wpmu_new_blog and delete_blog expectedDeprecated calls into test logic.

Use of the @expectedDeprecated annotation means that the deprecation notice is
expected across all versions of WordPress, while we in fact need to suppress the
notices only on WP 5.0+.

See #7984.

#5 @boonebgorges
13 months ago

In 12247:

Tests: More site-creation deprecation fine-tuning.

See #7984.

#6 @boonebgorges
11 months ago

  • Keywords needs-patch added
  • Milestone changed from 4.0 to Up Next

The tests improvements will ship with 4.0, but we'll need more work to use the new functionality. Since the new functionality isn't slated to land in WP until 5.1 anyway, there's no rush.

Note: See TracTickets for help on using tickets.