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
Refactor some common special-case settings #259
base: main
Are you sure you want to change the base?
Conversation
@@ -138,41 +138,32 @@ public static function get_onesignal_settings() { | |||
} | |||
} | |||
|
|||
/* |
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.
I removed this first comment block as I'm not sure if it's still meaningful. Are these supposed to be caller instructions?
// Do NOT enable the notify button for existing WordPress sites, since they might have a lot of users | ||
$onesignal_wp_settings['notifyButton_enable'] = false; | ||
} | ||
// These boolean settings are on by default for new installs only, and off by default on plugin upgrades, |
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.
Am I correct in my understanding here?
); | ||
foreach ($uncustomizedByDefault as $key => $value) { | ||
if (!array_key_exists($key, $onesignal_wp_settings)) { | ||
if ( $is_new_user ) { |
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.
is the array_key_exists/is_new_user dupe test still necessary?
This change is