[wp-trac] Re: [WordPress Trac] #2721: Add filter for wp-db query
WordPress Trac
wp-trac at lists.automattic.com
Fri Sep 1 15:23:51 GMT 2006
#2721: Add filter for wp-db query
-----------------------------------+----------------------------------------
Reporter: filosofo | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.1
Component: Administration | Version: 2.1
Severity: normal | Resolution:
Keywords: wp-db has-patch query |
-----------------------------------+----------------------------------------
Comment (by filosofo):
Thanks masquerade, I was just missing the obvious: instantiating the child
class as $wpdb. Duh.
Sorry, I haven't had much sleep recently. :-)
So please bear with me if I'm still not thinking clearly, but wouldn't the
re-defined $wpdb apply only to those db requests that occur ''after''
plugins are loaded? In other words, isn't the set of db requests that you
could affect via a child class (defined in a plugin) no greater than the
set of db requests that you could affect via my proposed filter?
Except it seems the child class technique has the disadvantage of making
you redefine the table variables and the entire query method, when you
might want just to make a simple string replacement.
--
Ticket URL: <http://trac.wordpress.org/ticket/2721>
WordPress Trac <http://wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list