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

Add documentation for WordPress.DB.RestrictedFunctions #2453

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

paulgibbs
Copy link

Related to #1722

Copy link
Member

@jrfnl jrfnl left a 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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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>
Copy link
Member

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">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<code title="Valid: Use WordPress functions">
<code title="Valid: Using a WordPress function to fetch posts">

);
]]>
</code>
<code title="Valid: Use WordPress functions">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<code title="Valid: Use WordPress functions">
<code title="Valid: Using WordPress functions to insert a post">

@jrfnl
Copy link
Member

jrfnl commented Jul 23, 2024

@paulgibbs Just checking in: did you have any questions about the review or are you good to proceed ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants