id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,focuses
15023,wpdb Filters,sc0ttkclark,,"Plugins wishing to hook into wpdb would benefit from having a few additional filters added. Right now, the only filter running is on query, which absolutely requires use of complex regex or a mysql parser to figure out what's going on.
Furthermore, I believe adding filters to the following functions would be useful for adding additional database support apart from MySQL without much code rewriting.
Existing Filter:
- wpdb::query 'query' (normal apply_filters) [Filter the query and rewrite if necessary]
New / Updated Filters:
(note, new filters use _exec at the end to differentiate from format original filter uses for 'query')
- wpdb::query 'query' (use apply_filters_ref_array and pass through &$this) [Filter the query and rewrite if necessary]
- wpdb::query 'query_exec' (use apply_filters_ref_array and pass through &$this) [Same as 'query' except it allows for a plugin to intercept the function and perform it's operations through other DB functions vs forcing mysql_query]
- wpdb::_insert_replace_helper 'insert_replace_exec' (use apply_filters_ref_array and pass through &$this) [Allows for a plugin to intercept the function and perform it's operations through other DB functions vs forcing mysql_query] {This function is used by wpdb::insert and wpdb::replace}
- wpdb::update 'update_exec' (use apply_filters_ref_array and pass through &$this) [Allows for a plugin to intercept the function and perform it's operations through other DB functions vs forcing mysql_query]",enhancement,closed,normal,,Plugins,3.1,normal,wontfix,,,