Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Retrieve plugin file to load from environment #307

Merged
merged 1 commit into from
Oct 22, 2019

Conversation

pierlon
Copy link
Contributor

@pierlon pierlon commented Oct 21, 2019

This allows a custom plugin file to be specified. Solves edge cases where the incorrect plugin file is loaded when multiple plugin files are present.

@derekherman
Copy link
Contributor

derekherman commented Oct 21, 2019

Thank you @pierlon, what was the reason for the force push? Can you describe how this would be used in the wild. Why would a plugin have two plugin files? That would be an issue with Core as well.

@pierlon
Copy link
Contributor Author

pierlon commented Oct 21, 2019

what was the reason for the force push

I missed a line:

Should I instead make a new commit with the fix and squash on merge?


Why would a plugin have plugin files

In our case, we would like to add a plugin to WP AMP for the ability to opt-in to beta updates, and putting it alongside the main plugin file would be the most logical option (see ampproject/amp-wp#3560). Having more than one plugin file in the same folder no longer guarantees that the correct plugin file will be loaded.

@kasparsd
Copy link
Contributor

kasparsd commented Oct 22, 2019

@pierlon Could you please check if this suggestion would work for your setup -- to extend the list of plugins loaded via WP_TEST_ACTIVATED_PLUGINS instead.

Copy link
Contributor

@kasparsd kasparsd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@kasparsd kasparsd merged commit e0205d7 into master Oct 22, 2019
@kasparsd kasparsd deleted the feature/custom-plugin-file branch October 22, 2019 09:04
@pierlon
Copy link
Contributor Author

pierlon commented Oct 22, 2019

Much thanks @kasparsd 👍 .

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

Successfully merging this pull request may close these issues.

4 participants