Streamline and enhance the plugin load procedure (rebased) #271
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(This is a rebased version of @christianwach's #260. I've simply copied/pasted his original description. At the bottom, I'll add some comments about changes/conflict-resolution.)
Overview
This PR should solve a couple of issues on Lab:
It replaces #205 for the above issues.
It also streamlines the plugin load procedure(s):
anonymous_user
role and default capabilities on plugin activation.wp civicrm install
now setswpLoadPhp
and creates the Base Page.It should be noted that there is still work to be done when CiviCRM is configured in "Multi-Domain" mode. The procedures to set up new Domains are more complex than CiviCRM in "WordPress Multisite with multiple separate databases" mode. The Base Page, for example, cannot be identified until the new Domain has been properly set up - because the new CiviCRM Domain reads the "root" Domain's settings until that point.
Having said that, this PR improves the experience for most developers most of the time and should help future progress on streamlining "Multi-Domain" mode.
Comments (Rebase/Conflict-Resolution)
There were two PRs going through contemporaneous review, #264 (which just changed the
wp civicrm install
) and #260 (which did code-cleanups and functional-updates across many files+functions... includingwp civicrm install
). Most files/functions/changes from #260 appear to merge cleanly with #264 - except for very harry conflicts aroundwp civicrm install
.So to make this PR, I did the following:
master
(which includes (dev/core#1615) wp-cli - Perform CLI installations using Civi\Setup #264).wp civicrm install
.wp civicrm install
, read and manually reproduce the prose cleanups (comments/messages; 3ad0227).But there is one notable section that I did not reproduce:
r-run
ningwp civicrm install
, I followed the same test procedure that I used in (dev/core#1615) wp-cli - Perform CLI installations using Civi\Setup #264, and I don't see any obvious problems. ThewpLoadPhp
setting appears reasonable in my environment: