[wp-trac] Re: [WordPress Trac] #2721: Add filter for wp-db query

WordPress Trac wp-trac at lists.automattic.com
Fri Sep 1 08:25:20 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):

 A filter might still be worthwhile, but most folks who want to tweak wp-db
 create a new db class that inherits from wpdb and replaces methods it
 wants to change.

 I'm trying to understand how that would work.  Since the wpdb class is
 instantiated as $wpdb before plugins are loaded (and therefore before any
 potential child classes), wouldn't any attempt to replace a wpdb method
 (as instantiated in $wpdb) be fruitless?

-- 
Ticket URL: <http://trac.wordpress.org/ticket/2721>
WordPress Trac <http://wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list