[wp-trac] [WordPress Trac] #29710: Add hooks to wpdb's insert(), update(), delete() and similar methods

WordPress Trac noreply at wordpress.org
Sat Sep 20 15:31:58 UTC 2014


#29710: Add hooks to wpdb's insert(), update(), delete() and similar methods
-------------------------+------------------------------
 Reporter:  borekb       |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Database     |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:  2nd-opinion  |     Focuses:
-------------------------+------------------------------
Changes (by johnbillion):

 * keywords:   => 2nd-opinion


Comment:

 We had a chat about this in IRC prior to borekb opening this ticket.
 [https://irclogs.wordpress.org/chanlog.php?channel=wordpress-
 dev&day=2014-09-19&sort=asc#m926092 Chat log here].

 My only concern with the proposed actions/filters is that not everything
 uses the `wpdb::insert()` and `wpdb::update()` methods. If a plugin on
 your site performs an INSERT or UPDATE using `wpdb::query()`, then the
 proposed filters won't see that query. This means, for example, that if
 you're logging INSERTs using the proposed new filter then you'll also need
 to use the existing `query` filter to guarantee you don't miss any
 INSERTs, thus rendering the proposed filters redundant.

 While the filters are a good idea in theory, I don't think they provide
 any actual benefit. I'm open to being swayed though.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29710#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list