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

Already on GitHub? Sign in to your account

Support Multisite network-wide activation #48

Closed
rachelbaker opened this Issue Dec 8, 2013 · 9 comments

Comments

Projects
None yet
5 participants
Owner

rachelbaker commented Dec 8, 2013

Update the activation and deactivation hooks to be compatible with WordPress Multisite network activation.

@ghost ghost assigned rmccue and rachelbaker Dec 9, 2013

Owner

rmccue commented Dec 9, 2013

So, the question is, do we want a per-site API, or one for the whole network? I'm inclined to lean towards the latter, similar to how WP.com uses public-api.wordpress.com for all the sites. Once we have #40, it's then cheap and easy to point to the correct one.

Member

danielbachhuber commented Dec 9, 2013

You'll want to do a detailed list of the pros and cons for each approach. In my opinion, the biggest failing of the WPcom API is that it doesn't load the context of whatever blog the request is for. No custom endpoints, etc etc. It basically makes the API a non-starter for anyone who wants to hack on top of it

The advantage of a single endpoint for all blogs is for third-party services that don't want to deal with connecting to a bunch of domains.

Owner

rmccue commented Dec 9, 2013

You'll want to do a detailed list of the pros and cons for each approach. In my opinion, the biggest failing of the WPcom API is that it doesn't load the context of whatever blog the request is for. No custom endpoints, etc etc. It basically makes the API a non-starter for anyone who wants to hack on top of it

The current multisite plugin uses switch_to_blog(), so it should be able to offer per-site custom endpoints. (The multisite plugin needs love, incidentally.)

The advantage of a single endpoint for all blogs is for third-party services that don't want to deal with connecting to a bunch of domains.

We're going to need that anyway, but #40 should make connecting easy. This is more about making it easier for network admins to manage, since bringing them altogether means that they can be centrally controlled easier. Whether this is really an issue or not, I don't know.

Member

danielbachhuber commented Dec 9, 2013

The current multisite plugin uses switch_to_blog(), so it should be able to offer per-site custom endpoints.

Sure, but switch_to_blog() doesn't load a plugin that Site B is running when the requests are proxied through Site A. It's fairly common to have a plugin (or theme) running on one site, but not another.

Owner

rachelbaker commented Dec 9, 2013

I agree with @danielbachhuber that to make the best decision here we should list the pro/cons.

My current use-case is:
I am currently working with the WP-API plugin on a 30+ site multisite network. Ideally, I would like to "network enable" the WP-API functionality. Reasons being:

  • The WP-API brings a whole new (and I might say BETTER way) of displaying and updating content data across sites in a Multisite environment.
  • WordPress Multisite feels like the forgotten wicked step-child that never gets the love and attention given to the first-born WordPress core.
  • I am lazy and don't want to have to activate the plugin on a per-site basis (that is what network activation is for).
  • The plugin will automatically be enabled when new sites are added.
  • I can keep the plugin "hidden" from the per-site plugin list, so a single site admin won't accidentally disable it.

I would love to hear how others are using or planning on using this plugin, and the cons against allowing the WP-API functionality to be network enabled.

Contributor

jeremyfelt commented Dec 9, 2013

Registering an un-grokked opinion here. I'd be happier using a per site API rather than one attached to the primary site on a network (or primary network on a multi-network setup).

@rmccue rmccue added a commit that referenced this issue Feb 17, 2014

@rmccue rmccue Merge pull request #49 from rachelbaker/multisite
Updated plugin activation and deactivation functions to be multisite compatible.

See #48
21c1f57
Owner

rmccue commented Feb 17, 2014

@rachelbaker Is there anything else you'd like to add here? I noticed that in #49, you didn't say it fixed this issue, so left this open for now. :)

FWIW, after more indepth use of multisite recently, I'm +1 on per-site. Per-network is cool, but that's something that'll only be needed in specialised cases, from what I can see.

Owner

rachelbaker commented Feb 17, 2014

@rmccue Let's close this issue for now, if there is anything else I would like to add I will open a new issue.

@rmccue rmccue closed this Feb 17, 2014

@kellbot kellbot pushed a commit to kellbot/WP-API that referenced this issue Aug 1, 2014

@rmccue rmccue Merge pull request #49 from rachelbaker/multisite
Updated plugin activation and deactivation functions to be multisite compatible.

See #48
0dd6f9f

jlambe commented May 5, 2015

Hi, not sure if this has been answered, but I'm also more on per-site API regarding multisite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment