Skip to content

Add documentation for WordPress.DB.RestrictedFunctions#2453

Closed
paulgibbs wants to merge 1 commit intoWordPress:developfrom
paulgibbs:docs/WordPress.DB.RestrictedFunctions
Closed

Add documentation for WordPress.DB.RestrictedFunctions#2453
paulgibbs wants to merge 1 commit intoWordPress:developfrom
paulgibbs:docs/WordPress.DB.RestrictedFunctions

Conversation

@paulgibbs
Copy link
Copy Markdown
Contributor

Related to #1722

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

jrfnl commented Jul 23, 2024

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

@rodrigoprimo
Copy link
Copy Markdown
Collaborator

@paulgibbs, 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!

@rodrigoprimo
Copy link
Copy Markdown
Collaborator

@paulgibbs, please let us know within a week if you are still interested in finishing this PR. If we don't hear back from you, we will presume you don't have time, and we will see if we can find someone else to take over and finish it. Thanks for your work so far!

@jrfnl
Copy link
Copy Markdown
Member

jrfnl commented Dec 27, 2025

Closing as superseded by merged PR #2676

@jrfnl jrfnl closed this Dec 27, 2025
@jrfnl jrfnl added this to the 3.3.x milestone Jan 28, 2026
@jrfnl jrfnl modified the milestones: 3.3.x, 3.4.0 Feb 24, 2026
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.

3 participants