Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix getting active plugins in multisite environment #788

Merged
merged 3 commits into from
May 31, 2021

Conversation

stefanullinger
Copy link
Contributor

Fixes #730

As discussed in #730 WordPress stores network active plugins of a Wordpress multisite environment in the active_sitewide_plugins option of the wp_sitemeta table. This option can be accessed using get_site_option.

We need to merge these plugins with the blog's active plugins in order to get a list of all active plugins for a single blog.

@leonstafford
Copy link
Contributor

This one will need to fix to satisfy the code quality checks.

You can run locally composer test to replicate what's happening in GitHub Actions. Or per-test type, like composer phpcs (can find the available commands within the composer.json.

I'd also suggest if possible to merge some of those lines in to avoid unnecessary "temporary variable assignments", like:

array_merge(
  other_func(
     other_func())

If that makes sense ;) If not, fine as is, if tests pass.

@stefanullinger
Copy link
Contributor Author

stefanullinger commented May 31, 2021

Alright, I've updated the PR.

I'd also suggest if possible to merge some of those lines in to avoid unnecessary "temporary variable assignments"

I've also changed this, but I have the feeling that it loses some valuable context and makes the code harder to understand.

@leonstafford leonstafford merged commit f515eb2 into elementor:develop May 31, 2021
@leonstafford
Copy link
Contributor

Many thx, @stefanullinger!

Yeah, I totally get the preference, probably just a style I'm getting used to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wp-content/plugins folder is not generated
2 participants