Skip to content

Commit 9dd8a6f

Browse files
committed
Remove second <code_comparison> block to simplify the documentation
I believe just one code_comparison block is enough for this sniff and keeps the documentation simple.
1 parent 753f914 commit 9dd8a6f

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

WordPress/Docs/DB/RestrictedFunctionsStandard.xml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -19,33 +19,6 @@ $results = <em>get_posts()</em>;
1919
$results = <em>mysqli_query</em>(
2020
$mysql,
2121
"SELECT * FROM wp_posts LIMIT 5"
22-
);
23-
]]>
24-
</code>
25-
</code_comparison>
26-
<code_comparison>
27-
<code title="Valid: Using WordPress functions to insert a post">
28-
<![CDATA[
29-
<em>wp_insert_post</em>(
30-
array( 'post_title' => 'Title' )
31-
);
32-
33-
// or...
34-
35-
global $wpdb;
36-
<em>$wpdb->insert</em>(
37-
"{$wpdb->prefix}_posts",
38-
array( 'post_title' => 'Title' ),
39-
array( '%s' )
40-
);
41-
]]>
42-
</code>
43-
<code title="Invalid: Using MySQLi library to insert a post">
44-
<![CDATA[
45-
<em>mysqli_query</em>(
46-
$mysql,
47-
"INSERT INTO wp_posts (post_title)
48-
VALUES ('Title')"
4922
);
5023
]]>
5124
</code>

0 commit comments

Comments
 (0)