Skip to content

Commit fdb6e13

Browse files
Coding Standards: Move wp-includes/wp-db.php to wp-includes/class-wpdb.php.
This renames the file containing the `wpdb` class to conform to the coding standards. This commit also includes: * A new `wp-db.php` that loads the new file, for anyone that may have been including the file directly. * Replacing references to the old filename with the new filename. Fixes #56268. See #55647. git-svn-id: https://develop.svn.wordpress.org/trunk@53749 602fd350-edb4-49c9-b593-d223f7449a82
1 parent b01c8f1 commit fdb6e13

File tree

6 files changed

+4032
-4017
lines changed

6 files changed

+4032
-4017
lines changed

phpcs.xml.dist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165

166166
<!-- Whitelist the WP DB Class and related tests for usage of direct database access functions. -->
167167
<rule ref="WordPress.DB.RestrictedFunctions">
168-
<exclude-pattern>/src/wp-includes/wp-db\.php</exclude-pattern>
168+
<exclude-pattern>/src/wp-includes/class-wpdb\.php</exclude-pattern>
169169
<exclude-pattern>/tests/phpunit/tests/db/charset\.php</exclude-pattern>
170170
</rule>
171171

@@ -325,10 +325,10 @@
325325
</rule>
326326
<rule ref="PEAR.NamingConventions.ValidClassName.StartWithCapital">
327327
<exclude-pattern>/src/wp-admin/includes/class-wp-list-table-compat\.php</exclude-pattern>
328+
<exclude-pattern>/src/wp-includes/class-wp-dependency\.php</exclude-pattern>
328329
<exclude-pattern>/src/wp-includes/class-wp-editor\.php</exclude-pattern>
329330
<exclude-pattern>/src/wp-includes/class-wp-xmlrpc-server\.php</exclude-pattern>
330-
<exclude-pattern>/src/wp-includes/wp-db\.php</exclude-pattern>
331-
<exclude-pattern>/src/wp-includes/class-wp-dependency\.php</exclude-pattern>
331+
<exclude-pattern>/src/wp-includes/class-wpdb\.php</exclude-pattern>
332332
</rule>
333333

334334
<!-- Exclude some incorrectly named files that won't be renamed. -->

src/wp-admin/install.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
require_once ABSPATH . 'wp-admin/includes/translation-install.php';
4343

4444
/** Load wpdb */
45-
require_once ABSPATH . WPINC . '/wp-db.php';
45+
require_once ABSPATH . WPINC . '/class-wpdb.php';
4646

4747
nocache_headers();
4848

0 commit comments

Comments
 (0)