[wp-trac] [WordPress Trac] #49028: Provide functionality to suppress $wpdb query filter
WordPress Trac
noreply at wordpress.org
Wed Dec 18 12:42:00 UTC 2019
#49028: Provide functionality to suppress $wpdb query filter
-------------------------+-----------------------------
Reporter: aurovrata | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Database | Version: trunk
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
The custom query class `wpdb` methods (`get_col`, `get_car`, `update`,
`delete`...) all use the underlying `query` method which (since WP 2.1)
has a filter hook 'query' which allows modification of the sql query.
Some queries are specific to the internals of a plugin's functionality and
are not meant to be exposed to other plugins/functionality, however,
currently, there is no mechanism to suppress this filter.
Would it make sense to add a boolean flag on the `$wpdb` instance which
would allow developers to suppress any query modification?
Something like `$wpdb->suppress_filters` which would be set to false by
default.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49028>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list