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

Fix syntax and formatting #12

Open
vielhuber opened this issue Dec 9, 2021 · 2 comments
Open

Fix syntax and formatting #12

vielhuber opened this issue Dec 9, 2021 · 2 comments

Comments

@vielhuber
Copy link

Hello!

I would suggest:

  • add missing commas in some lines
  • replace "array()" with "[]"

so that the gist can be copied and works "out of the box" without syntax errors.

Should I make a PR for that?

@EmSixTeen
Copy link

* replace "array()" with "[]"

This is against WP coding standards, where they must be declared using the long array syntax (array( 1, 2, 3)).

See here: https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/#declaring-arrays

@vielhuber
Copy link
Author

* replace "array()" with "[]"

This is against WP coding standards, where they must be declared using the long array syntax (array( 1, 2, 3)).

See here: https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/#declaring-arrays

Good point.

What about the rest (correct syntax)?

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

No branches or pull requests

2 participants