Closed JDGrimes closed 7 years ago
Complicating things further is the existence of what appears to be a primarily legacy feature, called multi-blog mode. This allowed BuddyPress to run like it was in per-site mode before it was possible to activate it per-site on multisite. So I think that the objects are still network-wide in multi-blog mode, but the settings aren't.
My understanding of multi-blog appears to be correct:
By default, BP always keeps its data in tables that are global to the network, regardless of whether it's activated networkwide or only on a subset of sites.
BP_ENABLE_MULTIBLOG
allows you to view BP content in the context of any network site (example.com/members/boone, example.com/site1/members/boone, etc), but the content will always be the same. You need BPMN, or something like it, to have separate sets of data within a single installation.
In https://github.com/WordPoints/buddypress/issues/2#issuecomment-244220661 I realized that BuddyPress objects appear to always be stored in network context, not per-site. I had assumed that they were per-site on multisite, but it turns out I was mistaken. I think that this is the case even when BP is per-site activated on multisite, though I'm not 100% sure.
Some discussion in the #buddypress channel on Slack led me to finding WP Multi Network and BP Multi Network (newer version on GitHub).
What these do is allow you to create an installation of multisite with multiple networks, but the same shared users. Using BP Multi Network allows you to have separate BP social networks on each network, rather than a single one global to all networks.
So this means that BP's objects can be in different contexts:
So the context needs to be dynamic based on which of these scenarios is matched on an install. I think it makes sense for us to introduce a base entity class for the purpose of providing this bootstrap. It could also provide the bootstrap for the storage info, since the table names need to come from the BP component info rather than
$wpdb
.