[wp-trac] [WordPress Trac] #33320: Custom table names for all wordpress tables for wpdb
WordPress Trac
noreply at wordpress.org
Mon Aug 10 12:53:38 UTC 2015
#33320: Custom table names for all wordpress tables for wpdb
-----------------------------+------------------------------
Reporter: soodl | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Database | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
-----------------------------+------------------------------
Comment (by pento):
Thanks for the extra information, @soodl.
Rather than adding new defines, it's possible for you to do this using a
`db.php` dropin as a replacement for WPDB.
`wpdb::tables()` is used throughout core to retrieve table lists, as well
as to set the WPDB table name members - `$wpdb->posts`, for example, so
well written plugins (that don't assume the table name) will continue to
function correctly.
By extending it as in the [attachment:db.php example I've attached], you
can replace a few or all table names.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33320#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list