-
Notifications
You must be signed in to change notification settings - Fork 0
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
Resolves phpcs errors #24
Conversation
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.
A few comments to look at.
The only other thing we need to think through is we're renaming a bunch of functions to avoid snake case. I think this is fine for any functions that are meant to only be used internally but any functions that we expect to be used by others, we need to properly deprecate those so they still work correctly.
As an example, the readme mentions the use of mailchimpSF_signup_form
, so I'd imagine there's a decent amount of people using this function on their site. If we don't deprecate this, any site using that function will not only not work but will throw undefined errors.
Not sure what other functions people may be using that we'll want to deprecate. If we're concerned, could also remove the linting rule about snake case and just keep function names as-is, though I like the idea of cleaning those up.
@dkotter I updated based on your comments. I used |
@@ -477,29 +500,50 @@ function mailchimp_form_field( $var, $num_fields ) { | |||
/** | |||
* Mailchimp Subscribe Box widget class | |||
*/ | |||
class mailchimpSF_Widget extends WP_Widget { | |||
class Mailchimp_SF_Widget extends WP_Widget /* phpcs:ignore Universal.Files.SeparateFunctionsFromOO.Mixed */ { |
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.
@dkotter Noting that this class probably should live in its own file, but I didn't think this PR was the appropriate time to move it.
Description of the Change
Edits the plugin to meet phpcs linting rules.
Changes include:
json_encode
towp_json_encode
in_array
$var
in_footer
for scriptstranslators:
text where placeholders existAddresses php linting in #12
How to test the Change
Changelog Entry
Credits
@nateconley
Checklist: