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

Change the set_status function to opt all plugins in or out simultaneously. #100

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

Camwyn
Copy link
Contributor

@Camwyn Camwyn commented Nov 7, 2023

Thus opting into one plugin opts into all, and opting out of one opts out of all. Makes the "mixed" status obsolete.

@Camwyn Camwyn requested a review from borkweb November 7, 2023 15:28
@Camwyn Camwyn self-assigned this Nov 7, 2023
@Camwyn
Copy link
Contributor Author

Camwyn commented Nov 7, 2023

Context on test fatal: WordPress/WordPress-Coding-Standards#2219

To correct/prevent the fatal, I've updated both automattic/vipwpcs and wp-coding-standards/wpcs

@Camwyn Camwyn requested a review from tarecord November 7, 2023 17:48
$option['plugins'][ $stellar_slug ]['optin'] = $status;

// Force the others to all match.
foreach ( $option['plugins'] as &$plugin_data ) {
Copy link
Contributor

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 ... }

@Camwyn Camwyn requested a review from lucatume April 23, 2024 20:15
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.

2 participants