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

WordPress Trac wp-trac at lists.automattic.com
Fri Sep 1 15:51:48 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 masquerade):

 {{{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. }}}

 No it doesn't, see the example above. Child classes inherit all methods
 and class variables/constants. None of the methods even have to be
 rewritten, you can do your modifications to the query and then pass it to
 parent::method.

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


More information about the wp-trac mailing list