-
-
Notifications
You must be signed in to change notification settings - Fork 522
[Update] Add WP DiscouragedConstants standard doc #2589
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
base: develop
Are you sure you want to change the base?
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.
@paulopmt1 Thank you for working on this documentation! Looking good.
Two small remarks:
- I wonder if it would make sense to combine the current code samples into one
<code_comparison>as they are basically demonstrating the same thing (use of discouraged constant). - I also wonder whether there should be a code sample demonstrating that (re-)declaring the constants is discouraged.
I imagine that may warrant it's own<code_comparison>block and possibly its own<standard>block. (also see my suggestion inline).
| > | ||
| <standard> | ||
| <![CDATA[ | ||
| The use of certain WordPress constants is discouraged. Examples include `TEMPLATEPATH` and `STYLESHEETPATH`. |
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.
| The use of certain WordPress constants is discouraged. Examples include `TEMPLATEPATH` and `STYLESHEETPATH`. | |
| The use and (re-)declaration of certain WordPress native constants is discouraged. Examples include `TEMPLATEPATH` and `STYLESHEETPATH`. |
| <standard> | ||
| <![CDATA[ | ||
| The use of certain WordPress constants is discouraged. Examples include `TEMPLATEPATH` and `STYLESHEETPATH`. | ||
| ]]> | ||
| </standard> |
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.
Duplicate <standard> block is unnecessary.
A <standard> can have multiple <code_comparison> blocks associated with it, so this block should be removed.
|
@paulopmt1, I was just wondering if you'll have a chance to finish this off in the near future. It would be great if this PR could be included in the next WPCS release. If you haven't got time or lost interest, please let us know and we'll see if we can find someone to take over. Thanks! |
Related to #1722
Surpases RafaelFunchal's change made here: #2493
Closes #2493