-
Notifications
You must be signed in to change notification settings - Fork 2
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
Change the set_status function to opt all plugins in or out simultaneously. #100
base: develop
Are you sure you want to change the base?
Conversation
Context on test fatal: WordPress/WordPress-Coding-Standards#2219 To correct/prevent the fatal, I've updated both |
$option['plugins'][ $stellar_slug ]['optin'] = $status; | ||
|
||
// Force the others to all match. | ||
foreach ( $option['plugins'] as &$plugin_data ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this line you've added a check to make sure the $option['plugins']
will default to an empty array if not set; the same possibility of the $option['plugins']
variable not being set should be handled here:
`if( isset( $option['plugins'])) { foreach ... }
Thus opting into one plugin opts into all, and opting out of one opts out of all. Makes the "mixed" status obsolete.