-
-
Notifications
You must be signed in to change notification settings - Fork 490
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
Add documentation for WordPress.DB.RestrictedFunctions #2453
base: develop
Are you sure you want to change the base?
Add documentation for WordPress.DB.RestrictedFunctions #2453
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.
@paulgibbs Thank you so much for getting this written up!
I've left some small remarks inline, but those are all small stuff, the principle of the docs looks good to me.
> | ||
<standard> | ||
<![CDATA[ | ||
Avoid touching the database directly with PHP library functions. Use the $wpdb object and associated functions instead. |
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.
Avoid touching the database directly with PHP library functions. Use the $wpdb object and associated functions instead. | |
Avoid touching the database directly with PHP library functions. Use the $wpdb object and associated functions instead. |
The indentation should always be multiples of 4, so this should either have 8 spaces or 4 spaces indentation, not 6.
Avoid touching the database directly with PHP library functions. Use the $wpdb object and associated functions instead. | ||
]]> | ||
</standard> | ||
<code_comparison> |
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.
Could you please reverse the examples ?
The left side should always be the "Valid" code sample, the right side, the "Invalid" code sample.
); | ||
]]> | ||
</code> | ||
<code title="Valid: Use WordPress functions"> |
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.
<code title="Valid: Use WordPress functions"> | |
<code title="Valid: Using a WordPress function to fetch posts"> |
); | ||
]]> | ||
</code> | ||
<code title="Valid: Use WordPress functions"> |
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.
<code title="Valid: Use WordPress functions"> | |
<code title="Valid: Using WordPress functions to insert a post"> |
@paulgibbs Just checking in: did you have any questions about the review or are you good to proceed ? |
Related to #1722