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

Allow is_network_activated to be filtered #1003

Merged
merged 6 commits into from Jun 20, 2019

Conversation

joehoyle
Copy link
Contributor

Currently there's no way to filter the network activated detection (bar filtering the option plugins activated value). This means unless the is_mustuse is triggered, you can't get the network wide behaviour when loading Stream in other ways.

I refactored this into a method that is consistenty used on the Plugin class, and also added a filter. Forcing network behaviour is then just a case of doing add_filter( 'wp_stream_is_network_activated', '__return_true' );

@kasparsd
Copy link
Contributor

Thanks so much @joehoyle! Is this ready for code review?

@kasparsd kasparsd assigned kasparsd and unassigned kasparsd Jun 18, 2019
@kasparsd kasparsd self-requested a review June 18, 2019 11:53
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 great!

Travis errors are due to wp-dev-lib using the latest version of WordPress 5.2 which doesn't support PHP below version 5.6:

Your server is running PHP version 5.4.45 but WordPress 5.2.1-src requires at least 5.6.20.

So we're OK to ignore that.

@joehoyle
Copy link
Contributor Author

Yup, good stuff!

@kasparsd kasparsd modified the milestones: 3.1.2, 3.2.4 Jun 18, 2019
@rheinardkorf
Copy link
Contributor

Very elegant! Thanks @joehoyle :)

@kasparsd kasparsd merged commit 90fa625 into xwp:develop Jun 20, 2019
@rmccue rmccue deleted the is-network-activated branch June 25, 2019 07:35
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.

None yet

3 participants